Code Sign error: No unexpired provisioning profile

2019-02-01 17:22发布

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?

22条回答
地球回转人心会变
2楼-- · 2019-02-01 17:33

I fixed mine by Analysing instead and checking that error. It indicated that my bundle ID was not lowercase as in the provisioning profile.

查看更多
ら.Afraid
3楼-- · 2019-02-01 17:34

I had this problem, and fixed it by putting my scheme back to Debug, as opposed to Release.

查看更多
来,给爷笑一个
4楼-- · 2019-02-01 17:34

In the Target settings, in Sumary, check if Bundle Identifier is exactly the same as in itunesconnect.com

as example:

Bundle ID: com.mycompany.myapplication

查看更多
Lonely孤独者°
5楼-- · 2019-02-01 17:34

I actually was having this issue but whenever I tried to get into the organiser it caused XCode to crash. To resolve this issue I went into my targets and changed everything under Code Signing Identity to iPhone Developer. The target defaulted to the provisioning profile I wanted and it worked.

查看更多
SAY GOODBYE
6楼-- · 2019-02-01 17:38

I fixed it by updating the bundle identifier in the project settings > targets > appName in the info tab.

查看更多
太酷不给撩
7楼-- · 2019-02-01 17:39

I had this error when trying to build a release version - no problem occurred for debug builds. Baffling because in the code signing section of the build settings I had the same profile selected.

The solution for me was to create and download a new distribution provisioning profile, even though from the settings it appears not to be used.

查看更多
登录 后发表回答