43

I have seen a few other questions that addressed this topic but none like mine. Yesterday I innocently added a device to the list of devices.

Question:

I am under the impression that once you add a device, it will now be linked to the provisioning profile. However, I believe it was not linked to one of my distribution profiles. So I went into edit the profile, clicked the checkmark next to the device, and hit submit. This is where the problems began.

I notice two things: I recently renewed my certificate/provisioning profiles about a week ago. Now, it thinks I renewed my provisioning profile yesterday ( or at least it says so in the organiser ).

Also, when I try to build any project I get the awful "No unexpired provisioning profiles found that contain any of the keychain's signing certificates". In the build settings my signing identity shows up under Identities without provisioning profiles. I have read horror stories of people having to tear everything down and rebuild and I hope I don't have to do that here..

Related question:
Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates

Community
  • 1
  • 1
Greg Price
  • 2,556
  • 1
  • 24
  • 33
  • 1
    Here is how I solved this if anyone ever has the same issue.. http://dr-palaniraja.blogspot.com/2010/04/berorcode-sign-error-provisioning.html – Greg Price Apr 10 '12 at 19:12
  • I ran into this problem when moving machines, fixed by following steps at: http://stackoverflow.com/questions/6769345/xcode-4-valid-signing-identity-not-found-error-on-provisioning-profiles-on-a – amleszk Apr 12 '12 at 05:10
  • Have you found a solution to this? I'm having the same problem. – Ryan Apr 23 '12 at 14:59
  • Most likely you will have to try the following: Manually download your provisioning profile and drag onto Xcode, the in build settings and target make sure you have the correct one selected... If that doesn't work you may need to open up your Xcode project file and manually search for where the provisioning profile is being assigned and change the uuid to the one that you want. For more detailed instructions see the link I posted above. It seems that this happens sometimes not sure why – Greg Price Apr 23 '12 at 16:48

6 Answers6

81

iOS distribution is such a pain in the ass! This worked for me (follow the steps in this order):

1) in the xcode organizer:

  • delete all provisioning profiles

2) in the mac os x keychain:

  • delete all iOS dev certificates

3) go to developer.apple.com

  • log in to the member center
  • revoke all certificates (edit: some redditors pointed out that this isn't a good idea if you're working in a bigger team. If that's the case try just deleting expired ones.)

4) go back to the xcode organizer:

  • click refresh (bottom right) under the provisioning profiles tab and login
  • List item

on the popups click the positive button

5) in your xcode project go to the "build settings" tab

  • under code signing pick the dev. and distr. identities
  • if they are not there or not valid go to developer.apple.com and navigate to "provisioning" if they are invalid just click modify and save them again

6) go back to the xcode organizer:

  • hit refresh again (bottom right)
j7nn7k
  • 17,995
  • 19
  • 78
  • 88
  • 3
    Thanks, this helped me out quite a bit! Step 1 to 2 were enough! – Vincent Cohen Nov 28 '12 at 09:45
  • 3
    HUGE buzzkill every time I have to do this. This is the right way to do it. To confirm: worked for me today w/ iOS6 & XCode 4.5.2 – William Entriken Jan 18 '13 at 05:16
  • Gona Bookmark this thread ..!! You never know when you will be needing this :) By the way.. Awesome @JoheGreen, Thank you..! – Shailesh Feb 09 '13 at 09:38
  • 1
    Just went through this process - did NOT work in xcode 4.6. Still fighting with it... – Aleks G Feb 12 '13 at 21:22
  • Thanks! Got some warning about revoking certificates (both dev and dist) so I got worried about the one app I already had out there but after looking into it it seemed fine to delete. Then I got this error: "Certificate identity 'iPhone Distribution: my name' appears more than once in the keychain. The codesign tool requires there only be one." It seems that the new stuff created in 4) conflicted with my old pub/private keys so I backed them up, removed them and then was able to validate and submit. Apple need to sort their shit out with the messy iOS release. Android is so much more simple. – pilcrowpipe Mar 10 '13 at 16:20
  • 2
    Clicking refresh in my organizer was all I needed - a good idea to check this first since it's a lot easier than deleting/revoking/recreating everything. Thanks to Johe Green. – jsaven Mar 31 '13 at 07:08
  • 4
    ios distribution is too hard. Apple needs to get their act together with better documentation, tools, or both, or it needs to relax things. This is when maniacal control is at its worst. – user798719 May 17 '13 at 15:12
  • Thanks for the quick layout. I had everything correct except checking my build settings. I popped the right provisioning profiles in there and it was back to normal. – TMilligan Jul 10 '13 at 21:15
  • Worked like a charm, Apple must pay you to copy this answer to their support document :) – Tien Do Oct 02 '13 at 02:32
  • Glad I could help. I did a quick writeup on the topic recently http://tech.particulate.me/ios/2013/10/07/no-unexpired-provisioning-profiles-found-that-contain-any-of-the-keychains-signing-certificates-horror/ – j7nn7k Oct 07 '13 at 15:32
9

Today I've installed Xcode 4.3.2, and immediately had the same problem! First trying to archive distribution, and after that In a clean new project, trying to run on a device. I fixed both problems.

1. For successful distribution I've downloaded and installed my distribution certificate from iOS provisioning portal, after that in Xcode I've setup Code Signing Identity correctly. This solved my problem with archiving.

2. I had the same problem creating new project and trying to run on device. Again in provisioning portal in certificates I've deleted my development cert. Also I deleted all development provision profiles. Also deleted them from organiser. Then I added the device again. Hope this helps!

Irfan
  • 4,301
  • 6
  • 29
  • 46
Petko
  • 91
  • 1
8

For me just hit the "Refresh Button" at the bottom right was the answer !

Hope I can help someone.

Thibaut
  • 81
  • 1
  • 1
  • 3
    This worked for me, but just to clarify where this refresh button is: In the Xcode Organizer window, go to Provisioning Profiles just under LIBRARY. Then simply click on the big refresh button in bottom right (you may then have to enter you Apple Dev username & password). If one of the profiles turns green then it's worked! – Jon Cox Jul 04 '13 at 16:06
3

I got this error when I the bundle identifier for my app did not match the provisioning profile I was trying to use with it.

iforce2d
  • 8,194
  • 3
  • 29
  • 40
1

I came across this today. It turns out that after I cleaned up my devices list (removed a few I'm no longer doing development for) it made some of my development certificates invalid. I deleted those from the provisioning profiles and regenerated them.

  • This answer has more or less been suggested already and the question is quite stale. Maybe this question helped you in your research and you should upvote it? Maybe another answer helped you and you should upvote that? – Doug Morrow Sep 07 '13 at 05:07
  • what u really what to say?go to comment – Somnath Kharat Sep 07 '13 at 05:09
1

I have Xcode 5.1 and i fixed the issue like this

Xcode -> Preferences -> Accounts -> View details -> Refresh button (Bottom Left)

After it was refreshed i clicked done, and the error was gone :)

Ibrahim Yildirim
  • 2,731
  • 2
  • 19
  • 31