Ios – Code Sign error: No unexpired provisioning profiles found that contain any of the keychain’s signing certificates

code-signingiosios-provisioning

I think I've reached the nadir of iOS provisioning hell. After migrating to a new mac and doing an archive for distribution, I received the error:

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

I then erased all certs and keys and provision profiles and did a "hard reset" (deleting all keys, certs, and profiles), following Apple's instructions by hand, with the same error. Then I did another hard reset and then had Xcode handle the whole thing via the Organizer, did another archive – only to see the same error.

I have all certs (WDRCA, Developer ID Cert Authority, iPhone Dev, iPhone Distribution) showing in Keychain Access, Xcode shows that it sees the dev and distribution certs, as well as the provisioning profiles, all marked with a green checkmark and "valid" status.

Code signing within the app show the correct dev and distribution is selected.

What's really troubling is that a Google search on the error shows one tech note from Apple that isn't very helpful, 2 tweets, and 3 results in Japanese – and nothing else. I contacted one of the tweeps and he said he fixed it with a hard result, which I have done twice.

Any ideas on where to go or what to do next?

Best Answer

Fixed it by Organizer -> Teams (select Your Team) -> Refresh (low right corner).