ChatGPT解决这个技术问题 Extra ChatGPT

Xcode 8 provisioning profile won't download

https://i.stack.imgur.com/mHez7.png

This is infuriating, I've been having the same issue. Also discussed here forums.developer.apple.com/thread/63621
as of today, I still don't have proper solution for this, I'm going on with automatic provisioning, and just reset everything for legacy project I was working on. Only reasonable thing I can suggest right now - file bug reports.
I've gone through same and I've answred. Please check if it works for you? I'm using xcode 8.1 GM version.
I had this same problem after I reset my app distribute certificate. Almost nothing mentioned here worked. "Nothing" is because I don't remember if there was a suggestion to delete failing provisioning profile and create new one for the same app. That fixed me with that one profile (and only one (I had 3 more failed to download profiles)). But when I came home and tried to do the same operation that failed before (download all) everything magically worked. So it's either network related or Apple just fixed this problem in last couple hours (and I really doubt it :) )

m
mogile_oli

I'm seeing the same issue where the download button is grayed but the download never seems to complete.

I manually deleted all the profiles in finder and clicked on download. Even if the download doesn't seem to complete, the profile is still downloaded...

You can check out your profiles in finder at

HOME/Library/MobileDevice/Provisioning Profiles

https://i.stack.imgur.com/dTGL5.png


in my case, after doing what you said, some profiles are downloaded and not seen in Xcode 8. I tried to delete all profiles manually and download them again, but it does not changes anything with their visibility in Xcode.
Worked for me too!
i
itai195

Note that this UI in Xcode is a convenience and shouldn't block your work. The profiles you'd like to download are still available following these steps:

Visit developer.apple.com in Safari Click Account and sign in Click on Ceritficates, Identifiers, and Profiles Navigate to the profile you're interested in and download it Drag the downloaded profile onto Xcode's icon in the dock.

At this point, your profile will be installed on your Mac and usable within Xcode.

For the OP — if manually installing the profile this way didn't resolve the issue, then you're likely seeing another configuration problem or a bug. Could you clarify what you saw after you manually installed the profile and selected it in the General tab — did you get a build error or other issue?


Well, I've tried this on all 3 profiles we have and it doesn't seem to do anything. I download the profile from the website and double click on it. This brings up Xcode, but otherwise no other indication anything has happened. And the profile still has the Download button in Preferences.
C
CodeSmith

I got around it by unchecking and rechecking:

Project Settings -> General -> Signing -> 'Automatically manage signing'


This is of course the right thing to do from Xcode 8 and iOS 10, and that is how (i suppose almost all) developers put "provisioning nightmare" to an end, +1. My question is about solving the problem with Xcode's UI, since there are some cases when somebody would like to use "old" provisioning profiles in a project that is not new.
Same problem but unchecking and rechecking didn't fix it this time. Had to leave it unchecked and manually select the correct provisioning profiles, once I did that it worked correctly. When left on Automatic, xcode would use a provisioning profile it managed (doesn't appear in web portal) and it just wasn't being updated with new devices.
Also didn't fix the problem for me.
This didn't fix the problem for me. I had to re-open another project (which worked before) and close it and open the one had problems to make it work. I repeated this twice.
Isn't that the point of "automatically manage signing"? Turning it of enables me to manual select my provisioning profile.
g
gop

In mu case the issue started appearing after I added Push capability(I checked the push notification toggle button in target->capabilities) If I go and uncheck that then I can build and upload to app store.


An update. I was able to make it work. For some strange reason in the developer portal my provisioning profile for distribution (for testflight) was set to work with some certificate for which I did not have the private key in my keychain. I changed the certificate with another one for which I had the private key and everything worked well. Check your provisioning profiles! I am not sure if this is Xcode8 related but surely I didn't change it by myself.
t
tigerMike

I was having this same issue. Here is what I did that solved the problem for me.

First I right clicked on each of the two profiles that would "grey-non-download" and moved to trash.

Then I deleted the developer account within Xcode.

I re-added the developer account, went back to details and download all.

It worked for me, hope this helps.


Note, my case the app it is distributed ad-hoc, and has had no source code or feature changes in months, so it is not (for me) related to that. I only need to profiles when I add devices.
1st point only solved it. No need to delete and re-add dev account. In my case provisioing profile was renewed. As you mentioned in the 1st point 'each of two profiles', I just had look in for it, but there that was not two. So I visit developer portal and click my provisioning profile->edit->generate. Now coming back to the XCode account preferenc, I see there are 2 profiles. 1 with download option and another without it. So the first point : moved profile without download button to trash, and download other one successsfully
V
Vighnesh Pai

The answer is here.

Its doesn't sound much but it really worked for me.

Just right click on the provision profile and click on Show in finder. Then delete all the provision profile in the entire folder.

Not goto Xcode project settings and Check the checkbox, Automatically manager signing. The xcode will do the rest for you.


please read whole discussion before posting - manual deletion of provisioning profiles was mentioned here
S
Skela

I've had this issue too, and have had some success with renaming the profile. For example, it used to be named "[App Name] Dev", and no matter what I did, renewing, deleting and recreating with the same name, manually installing it, it just would not work at all. Until I renamed the profile to "[App Name] Development".


G
George

https://i.stack.imgur.com/QbVkr.png


V
Varun Kumar

Try deleting and adding your account if that doesn't work out

try

Open Terminal

Type defaults delete com.apple.Xcode and press "Enter." This deletes the customised settings set up.

Type rm -rf ~/Library/Application\ Support/Xcode and press "Enter." This removes the configuration folders as well.

This saved my day if problem persists again reinstall Xcode


something has changed - now profiles download in random way, some are being downloaded, with others problem persists, at last some show as downloaded and after few seconds the download button appears again. I'll try to work on it.
Did not work for me. I'm seeing same behaviour as @gameCon
to delete your defaults you might need to do defaults delete com.apple.dt.Xcode rather than defaults delete com.apple.Xcode
M
Mridul Gupta

I've come across same problem and nothing solved it, so i found one work around

Download provisioning profile directly from developer account and double tap on it, it will get install in xcode. Download and install iPhone configuration utility. Open iPhone configuration utility there you will find all the provisioning profile Then select the provisioning profile you want to use, then it details of the profile you can see Profile identifier. Copy that Profile identifier and open xcode. Navigate to the code signing identity and there in provisioning profile select others and paste the copied Profile identifier. Bingo!


I tried this way, but no success. I've switched to automatic provisioning profiles way, perhaps this is just a bug to file.
N
Nico

In my case (Xamarin.iOS btw) I've manually deleted all provisioning profiles located in HOME/Library/MobileDevice/Provisioning Profiles but I needed to do something else to be able to deploy the app to a device:

The problem was that I had implemented the brand new iOS 10 Push Notifications Framework, which requires the addition of the following property to the Entitlements.plist:

<key>aps-environment</key>
<string>development</string>

And I was trying to deploy a development version using the value production instead of development. Changing that value did the trick.


A
Al-Mothafar

Actually, all provided solutions could work or not, it depends on your luck, but mainly you have to keep delete account, clean up provision profiles like "mogile_oli"'s answer, and re-add them, but also, don't forget to reset signing identities:

Accounts -> Select Added Account -> Select Team and View Details (or double click team name) -> you will see Reset button if needed, click on it,

And you really need to try to build with Automatic Signing first then remove it, it seems can't be downloaded with button, for now just ignore the download button from this page, but better to use the dialogs while you try to build.

And always Quit Xcode and Re-open it after almost each action you do, After wasting like 2 days, I made it work like this !


n
nacho c

I had the same issue. I leave the solution that worked for me:

I deleted all certificates that were expired from my keyChain, I noticed that the new certificates didn't download because I had an expired certificate related. I don't know why it seems to be an issue of my keyChain/iTunes


this didn't work for me, however it probably may work for others. Indeed, keychain has some known bugs related to add/delete functions, at least on iOS, so macOS may be similar, but I don't have full justification for this statement.
@gameCon I absolutely agree, It seems to be a keychain bug. I don't have a justification too.
c
charlin agramonte

I solved it by creating my own development certificate (In Xcode) and assigning it in the development provisioning profile. After I download and double click it I was able to get it working fine.