"No unexpired provisioning profiles found that contain any of the keychain's signing certificates" Horror

Greg Price picture Greg Price · Apr 10, 2012 · Viewed 54.3k times · Source

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

Answer

j7nn7k picture j7nn7k · Jul 3, 2012

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)