91

I've struggling with this for hours. I have 2 same provisioning profiles I've created and the new profile didn't substitute the old one (which expires 6 days earlier than the new one). Through the XCode 5 menu I can't seem to delete the duplicate provisioning profile. Any workaround in this situation?

Sergey Grischyov
  • 11,995
  • 20
  • 81
  • 120

13 Answers13

189

If you delete the profile from the Apple development a/c and hit refresh in XCode (Using xcode>Preferences>Accounts) then these profiles will be gone.

You can remove them from the this directory on your machine: "~/Library/MobileDevice/Provisioning\ Profiles"

Fry
  • 6,235
  • 8
  • 54
  • 93
rakmoh
  • 2,953
  • 1
  • 16
  • 14
  • 19
    it's incredible issue.. with Xcode 5 - I close xcode - I remove profile from "~/Library/MobileDevice/Provisioning\ Profiles" - I Remove profile from devcenter portal - I open Xcode, Preferences, Account, ViewDetail and click refresh button. The deleted profiles now appear again! how it's possible? – TheMiloNet Oct 04 '13 at 10:28
  • 1
    @milonet Xcode 5 (re)creates Provisioning Profiles automatically - even if they are deleted manually. I haven't figured out yet how to prevent it from doing so. There's a lot of threads about this... – Andreas Ley Oct 07 '13 at 09:10
  • 4
    Using xcode>Preferences>Accounts refresh seems a cleaner solution. See answer below by @loadedion – pstoppani Oct 23 '13 at 15:17
  • 6
    Xcode now creates developer profiles for your bundle ID automatically, and if you use Xcode >Preferences >Accounts >select-account >view details >refresh it will recreate them. There is no way to turn this off. Like others, I've filed a but report (radar) for this asking for it to be changed. – Bill Patterson Jan 19 '14 at 02:11
  • this path does not work for me, I used ~/Library/MobileDevice/Provisioning Profiles, '\ ' before profiles will not work here – Chander Shakher Ghorela - Guru Jan 21 '14 at 06:00
  • Open finder, ⌘-Shift-G, and paste ~/Library/MobileDevice/Provisioning Profiles – Lucas Mar 26 '14 at 20:07
  • 1
    @pstoppani: THANK YOU! I'm testing with testflight and every time I will add a new member I have to add a new adhoc profile to xcode: I have 10 profile with the same name! I didn't know where are specific testing people! I use refresh button in xcode>Preferences>Accounts and it solve my problem with the last profile, this thing make me crazy! thank you +1! – Tenaciousd93 May 21 '14 at 13:14
  • Hey i cannot find MobileDevice folder inside library... Am i missing something obvious... ? – Mihir Mehta Jun 18 '14 at 16:53
  • @mihirmehta Are you checking in the Library folder under your home directory? – rakmoh Jun 19 '14 at 19:09
42

In the Xcode Preferences, go to Accounts, then go to your apple ID, then click "View Details" Click the provisioning profile which you would like to delete, then press the "delete" key ONCE. Then click the refresh icon for manually update the list(pretty counterintuitive...).

Using this method I was able to delete all but one copy of the same provisioning profile, after which the delete does nothing.

Abizern
  • 146,289
  • 39
  • 203
  • 257
loadedion
  • 2,217
  • 19
  • 41
  • hi, i cannot delete with "delete" key.. where is delete key? on keyboard? i try both canc and backspace.. but not work! – TheMiloNet Oct 04 '13 at 10:22
  • i know that all keyboard have a delete button but not work! i try both backspace and delete button but the provisioning profile not delete! – TheMiloNet Oct 04 '13 at 23:42
  • 2
    Macbooks don't have delete keys. Backspace doesn't work, at any rate. – Norswap Oct 07 '13 at 08:11
  • This is not working for me (nothing happens at all). – Andreas Ley Oct 07 '13 at 08:55
  • The closest equivalent I can think of for delete is cmd+backspace. As I stated, with this method I was able to delete all but the last version of the same provisioning profile. – loadedion Oct 07 '13 at 16:15
  • 4
    This does work - but you need to hit refresh after pressing the delete key. Make sure you do this otherwise it deletes more than one! PS - delete on a laptop is Fn-Backspace – Giles Williams Oct 10 '13 at 13:28
  • 3
    Works for me, +1 to make up for all the doubters. There is no visual feedback though, until the refresh completes, so a -1 for Apple. – Gordon Dove Oct 17 '13 at 13:57
  • Nothing of the stated previously works for me, and even when I delete the provisioning profiles from Itunes Connect, they are regenerated – cprcrack Oct 17 '13 at 18:24
  • **"Using this method I was able to delete all but one copy of the same provisioning profile, after which the delete does nothing."** I would imagine in order to delete those auto-generated profiles, you would have to go through the iOS dev center. – loadedion Oct 21 '13 at 15:38
  • A simple "refresh" will get rid of all duplicates. To delete a profile, you'd need to delete it from the dev center. Thanks @loadedion for the pointer to Accounts! What a pain. It should be in the Organizer. – pstoppani Oct 23 '13 at 15:19
  • 1
    You can't delete it from the dev center. I will reappear when you refresh i Xcode. – Sten Nov 06 '13 at 11:17
  • I also have the "immortals" provisioning profiles. Well, Apple and tons of recent bugs in Xcode 5 made me give up. I will let them hanging there... – Trein Jan 02 '14 at 18:58
  • When you hit refresh button, invalid ones are deleted by themselves. No need to hit delete. – Topsakal Jan 06 '14 at 02:57
  • Tangent: I believe that using the fn key + backspace or delete (fn-backspace or fn-delete) makes it act like the other one. – Olie Feb 05 '14 at 21:52
  • 1
    I didn't have to delete anything... just hit refresh and the duplicates were removed. Thanks ;) – budiDino Mar 25 '14 at 13:23
8

You probably don't need to delete the duplicate profiles. Just go to Xcode / Preferences / Accounts / / View Details and hit the refresh button.

I did this and my duplicate provisioning profiles disappeared. Now when I post builds to TestFlight the distribution lists are all correct.

ohthepain
  • 2,004
  • 3
  • 19
  • 30
6

enter image description here In the Xcode Preferences--> Accounts, delete your account, add account again,click on your developer ID, press refresh, select provisioning profile again under build settings.

THATS IT. ALL YOUR PROBLEMS ARE SOLVED

Ashish P
  • 1,463
  • 1
  • 20
  • 29
4

I am using "iPhone configuration utility for Mac OS x" provided by apple for managing my all provisioning profiles for Xcode 5.

From apple's website:

iPhone Configuration Utility lets you easily create, maintain, encrypt, and install configuration profiles, track and install provisioning profiles and authorized applications, and capture device information including console logs.

You can download it from here

You can delete the provisioning profile:

  1. Open the utility and select the provisioning profile from the list.
  2. From the top menu select "Edit" than "Delete"
Muhammad Zeeshan
  • 2,441
  • 22
  • 33
2

To remove any reference to an unwanted provisioning profile from XCODE 5 here is what I did:

1) Browse into the YOURAPP.xcodeproj directory

2) With vi I opened up the project.pbxproj file

3) Find PROVISIONING_PROFILE="ID_OF_THE_PROV_PROFILE_YOU_WANT_TO_DELETE"

In every instance I saw this in the file I just set it to "" and XCODE never gave me an error again.

neuman8
  • 324
  • 4
  • 15
2

All of the methods mentioned so far will still fail to delete certain "Managed by Xcode" profiles, which you may find will continually re-appear no matter what you do to delete them.

The problem seems to be that certain profiles are auto-generated by Xcode/Apple Developer Centre based on the App Ids you have. In my case I see one "Developer" profile per app ID (including the wildcard).

I would imagine that the only way to get rid of these is to remove the App Id itself through the Dev Centre. Often this is not possible since the Dev Centre will complain that the app "...exists in the App Store so it cannot be removed" - even when the app in question is not actually in the store.

chris838
  • 5,148
  • 6
  • 23
  • 27
  • none of the above but this worked. Indeed I had * wild card ID added by Xcode, as soon as I got rid of it, duplicating stopped – Boris Gafurov Mar 03 '15 at 17:59
0

None of the previous suggestions worked for me. What did finally eliminate the unwanted profiles was the following:

  1. Remove the developer account from Xcode > Accounts
  2. Quit Xcode.
  3. Delete the unwanted provisioning profiles in the developer portal.
  4. Delete all the files ~/Library/Developer/Xcode/DeveloperPortal*.*
  5. Empty the trash.
  6. Restart Xcode and add the developer account back in.

I was thrashing around so this might not be quite the magic formula but something along those lines. By design, Xcode automatically creates provisioning profiles based on the app identifiers set up in the developer portal with names like "Mac Team Provisioning Profile: ". This is a great feature but it adds to the confusion with this deletion issue.

spinacher
  • 549
  • 6
  • 10
0

From my experimentation i believe that Xcode pulls the provisioning profiles straight from the dev center.

i say this because i created a new provisioning profile from the dev center and it appeared in Settings > Accounts before i double-clicked the .mobileprovision file.

So basically, delete the profiles from developer.apple.com

MoralCode
  • 1,954
  • 1
  • 20
  • 42
0

In my case this worked: Right click on a provisioning profile in the accounts tab -> view details panel. Click the option show in finder -> delete them directly in finder.

the Reverend
  • 12,305
  • 10
  • 66
  • 121
0

For all the people who are seeing the profiles magically reappear after deleting them and hitting refresh, simply wait a few minutes after deleting and before hitting the refresh button.

232 Studios
  • 105
  • 3
  • 12
0

For deleting provisioning profile we can use iPhone Configuration Utility software.

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 button. So it will remove it from your existing Xcode application and even from your PC.

Image shows for deleting provisioning profile.

Nirzar Gandhi
  • 79
  • 1
  • 8
-1

I've figured out that it takes some time interval to sync between local path of the provisioning(~/Library/Developer/Xcode/DeveloperPortal) and the iTunesConnect server. So once you have deleted your provisioning profile on the local path and on the iTunesConnect server (you should remove both for clearing), you need to wait at least 5 minutes, otherwise you will see the files you've deleted again on the local path when you try to press 'fix it' button in Xcode.

user1118321
  • 25,567
  • 4
  • 55
  • 86