Permanently remove Xcode provisioning profiles - ios

How do I permanently delete the provisioning profiles that Xcode creates and manages?
I tried:
Deleting them from the Apple Developer site
Selecting them in Xcode's Accounts settings and choosing Move to Trash
Deleting the profiles on my connected iPhone, in Xcode's Devices window
Deleting and re-adding the Apple ID from Xcode's Accounts settings.
Making sure ~/Library/MobileDevice/Provisioning Profiles is empty
Quitting and re-launching Xcode
But then when I go to Xcode's Accounts settings and click Download All, the deleted profiles re-appear. Where are they coming from? How do I get rid of them?

First delete them from the Apple Developer Site.
Do not allow Xcode to manage it via Automatic option (most important thing). Always choose provisionings you create manually in Developer Site.:
you may remove them via Accounts Preferences (right click on item -> Move to Trash):

I have no idea if this is safe, but I deleted the files ~/Library/Developer/Xcode/DeveloperPortal*. After doing that, the profiles are no longer re-created when I click Download All. This worked on two separate machines.
After doing this, I had to delete and re-add the Apple IDs to Xcode, so that it could find their teams again. I didn't notice any other problems.

Related

How to make Xcode 8.2.1 refresh provisioning profile list ? seems like Xcode bug

new provisioning profile appears in Apple's dev portal, but I can't see it in Xcode, tried to Download all profiles, kill Xcode, restart computer, none of them worked.
I've seen similar issues and I think its an XCode bug also, try the following:
Open your provisioning profiles folder(right click on any existing one and show in Finder).
Make a back up of existing profiles just in case(select all, compress, etc)
Delete those profiles
Download all again from XCode and it should work.

Xcode 7 how do you refresh provisioning profiles?

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.
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.
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.
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
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.
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.
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.
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.)
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.

Apple Account Not have any Development Teams

I have logged in Xcode settings Accounts with my Apple ID and password, but still it's showing "Not on Any Development Teams". I am using Xcode 6.2.
This is an Xcode bug that has hit a lot of people. What seems to fix it is deleting the account from Xcode prefs using the "-" button, and then adding it back. I've done that on a couple of Macs, more than once, and it has always worked-- for a while. You may need to click "view details..." and then use the reload button afterward to ensure everything is up to date.
In case anyone from Apple happens to see this, please look up rdar://19870347
Download the provisioning profiles and certificates from the Member Center and save them to somewhere you can access them. Then, double-click the profiles and certificates. This should bring up Xcode as well as Keychain. You can dismiss the windows and that should work.
In Xcode, go to build settings and check that under Development and Distribution certificates the corresponding ones are correctly filled in.

Deleted provisioning profile keep coming back

I'm trying to delete a development provisioning profile that I don't need anymore, but it keeps coming back.
I tried deleting it in the developer center, but it shows up on my xCode 5.
So I went into xCode's Preferences > Accounts > View Details and deleted it from the Provisioning Profiles section. Clicked refresh, and it was gone.
But... quit xCode, boot it up again, and the deleted provisioning profile is back. Now refresh the Provisioning Profiles page on the developer site, and it's there as well.
No matter which combination of deletions I used, first in xCode or first on the site, the provisioning profile is coming back.
Following an advice in one of threads, I installed the iPhone Configuration Utility, and deleted the provisioning profile there. It came back.
Following another thread's advice I looked for ~/Library/MobileDevice/Provisioning Profiles in order to delete it there, but there's no such directory on my mac with OSX 10.8.5.
Any advice?
EDIT: looks like clicking the refresh button on the Preferences > Accounts > Apple ID > Provisioning Profiles is the culprit. As long as I avoid doing that, the profile doesn't come back.
I guess this is NOT really an answer, so it would still be great to get a comprehensive explanation of the issue here.
Use iPhone Configuration Utility to delete the provisioning profile.

How remove a old provisioning profile in xcode 5?

I've install different provisioning profile in my xcode 5, before for remove it you had a session with all provisioning profile installed on the mac, but now this session disappear, how can I have access to this session now?
The best way to do this in XCode 5 is using an iPhone Configuration Utility. It lets you manually delete duplicates of provisioning profiles with ease and speed.
I keep Xcode closed when I do this just in case.
Edit:
For anyone wondering how to actually 'delete'. There are only two ways: a. menu -> b. Hit the / keyboard button.
You can delete the files directly from ~/Library/MobileDevice/Provisioning Profiles
Open finder, ⌘-Shift-G, and paste in the above path. Restart Xcode afterward.
Check out this related question for other suggestions.
Mirko's answer is correct- however, below I am trying to explain "why-it-is-so" on XCode5.
On XCode5, you are not supposed to/allowed to directly delete a provisioning profile- I think Apple has changed the paradigm a little bit and wanted to streamline the process, while making the provisioning and signing of binaries more secure. The idea on XCode5, is to allow you to login using your dev apple ID and then X-Code will be in sync with all your provisioning profiles. If you want to delete a profile (probably expired or redundant), you go to your dev profile and delete it- since the X-Code has all the details about your apple ID and provisioning profiles (as seen in the screenshot)- it will sync itself with your latest list of profiles- you do not have to worry about deleting those from X-Code anymore (and hence you can not delete these from X-Code anymore).
To delete a duplicate of an edited provisioning profile, you can also go to Xcode -> Preferences -> Accounts, select your account, and hit the refresh button on the bottom left corner under the provisioning profile list.
There are two ways for deleting your old provisioning profiles from Xcode.
1. Xcode Preferences
2. iPhone Configuration Utility Software.
Xcode Preferences -> Go Xcode -> click on left hand side top toolbar option Xcode -> Click Preferences -> Accounts, select your account, and hit the refresh button on the bottom left corner under the provisioning profile list.
By doing this you can delete your provisioning profiles.
iPhone Configuration Utility Software -> Install this software -> Open Software -> Provisioning Profiles -> find list of your all profile -> Press Backspace button, it will ask to delete provisioning profile ->Click on delete provisioning profile. So it will remove it from your all existing Xcode application and even from your PC.

Resources