ChatGPT解决这个技术问题 Extra ChatGPT

Xcode 7 如何刷新配置文件?

In Xcode 6 you would click on Xcode -> Preferences -> Account -> View Details -> then there would be a little circular arrow. That is gone and there is now a "Download All" button that when pressed does not reload your provisioning profiles.

I've even tried deleting my account and re-adding it. Still no good.

Be sure to file a report using Apple's Bug Reporter Tool if you would like the "Refresh" functionality to be re-added to future versions of Xcode. No guarantees it'll come back, but Bug Reporter requests do matter to Apple's decision-making process.
Here a good radar to duplicate if you're (like me) too lazy to type a new one : openradar.appspot.com/22868032

m
macserv

Xcode 7 should automatically refresh your profiles locally when a change occurs to a profile in the Developer Portal. However, you can force this to occur by deleting and re-downloading the profiles.

Begin by opening Xcode's preferences window (Command+,). Select the Accounts tab, and click the "View Details…" button. In the bottom list that appears, Shift+click or click+drag to select the profiles you'd like to refresh. Then, right-click one of the selected profiles, and choose "Move to Trash" from the contextual menu.

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

Once that's done, the "Download All" button should pull down fresh copies of everything in the Apple Developer portal.

Profiles not deleting? Per feedback in the in the comments below, if you delete a very large number of profiles, Xcode may appear to do nothing, despite having actually removed all of the selected profiles. If you believe that this is the case, it may help to restart Xcode.

Be sure to take care when selecting profiles to delete… if they're not in the portal (e.g., they were supplied by another developer), Xcode can't automatically get them back for you. If you accidentally delete such a profile, you can find it in the Trash.


This doesn’t seem to work for me (using the final Xcode 7.0 App Store build), I don’t get a contextual menu on the list of profiles. Any idea?
Didn't work for me either. The dates didn't refresh.
isi 8 and Frederik: Not sure what's up on your end... I can confirm in version 7.0.1 that the contextual menu still appears when a selected profile is right-clicked.
@macserv Yes I found out elsewhere that you need to delete it in the member center first, which is not mentioned here.
As an extra note here. When deleting a lot of profiles, it can appear like xcode has done nothing, despite it having deleted everything. A restart of xcode will kick it back into gear.
g
gauteh

You can delete directly your Provisioning Profiles by running:

rm /Users/[userName]/Library/MobileDevice/Provisioning\ Profiles/*

Then re-download your profiles, Xcode -> Preferences -> Account -> View details... -> Download All

Your list in Target -> Build settings -> Code signing -> Provisioning Profiles will be updated.

YM


Or rm ~/Library/MobileDevice/Provisioning\ Profiles/* which does the same (~ always points to the current user's home folder).
d
dragonflyesque

I had this issue with a workspace containing multiple projects in XCode 7. My developer certificate had expired so I needed to get a new one and reassign it to my provisioning profile. This ended up being a major problem because the expired provisioning profile kept rearing its ugly head and would not get updated automatically. It was in fact listed in XCode->Preferences->Account->View Details twice (where, I might add, there was no refresh button and no contextual menu). Nothing I did made it go away and XCode kept asking for the wrong provisioning profile.

I finally solved it by deleting all of the profiles in ~/Library/MobileDevice/Provisioning Profiles, opening the workspace in XCode 6 and using the refresh button that DOES exist in XCode->Preferences->Account->View Details.


Had same issue. It helped. Thanks for posting this answers
Thank you thank you thank you thank you- damn delays! Deleting everything in the provisioning profiles folder is the only thing that worked!
T
TheJeff

XCode8: There is one provisioning profile that still always shows "Download". No matter what - it's the share extension app group provisioning profile for distribution.

I've tried:

Deleting all provisioning profiles in the Accounts tab "Move to Trash", then manually re-importing by downloading and dragging them to xcode - one still shows "Download" Deleting the apple id associated with the account, then re-adding my apple id. Then manually re-importing by downloading the provisioning profiles and dragging them into xcode - one still shows "Download" Downloading the provisioning profiles in the Preferences->Accounts is still really buggy and never works for me. It doesn't matter if I'm behind a proxy or not. Deleting all provisioning profiles by removing the folder in /Library/MobileDevice/Provisioning profiles, then re-importing them by downloading the provisioning profiles and dragging them into xcode - one still shows "Download"

Apple, please fix this. Thanks. :)

I'm wondering if there is a guid mismatch in the project file or something, or if reinstalling xcode will help at all. This worked in xcode7, but now I'm using xcode 8.

UPDATE: The provisioning profiles were invalid but they weren't showing as invalid in the Apple Developer Site. When I toggled "automatically manage signing" to true, then back to false again, they showed up as invalid, then fixing them + re-importing them fixed the problem. What a disaster.


I also needed to move away and re-download the provisioning profiles in order to see the latest changes reflected. Thanks for this answer. Apple really needs to fix this. :(
o
ocwang

Make sure you've actually changed your provisioning profile. I ran into this same issue when I was trying to add a device to a provisioning profile. I added the device to my developer account, but had forgot to take the next step and add the device to my provisioning profile.

If your provisioning profile has changed, XCode (7.0) should automatically grab the updated provisioning profile once you visit Xcode -> Preferences -> Account -> View Details. There will be a download button you can click next to each updated provisioning profile.


C
Community

As mentioned in one of the answers in Refresh devices in team provisioning profile managed by Xcode 7? , you can just delete and re-add the Apple ID in the Preferences->Accounts panel, which should regenerate the xcode-managed team provisioning profiles in the Developer Center. (Other answers suggest to right-click provisioning profiles, which doesn't work for me, or apply to older versions of XCode for which the answers no longer apply.)


i
i.AsifNoor

Add your new device to provisioning profile.

Sometimes XCode 7+ does not automatically refresh provisioning profile. I removed apple id from Xcode -> Preferences -> Account and then added again. There was download button instead of newly updated profile. Click download. Close XCode and open again. It should work perfectly.


You don't need to remove your Apple ID entirely, you can right click on the provisioning profiles you've downloaded and select "Move to Trash"