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:48

In the Build Settings look for

General > Identity > Bundle Identifier and Team Settings. Fill in the Bundle Identifier and select Team. (this basically your publishing info). Of course as the others have written you'll need the correct dev or team account. This solution worked for me and resolved the build error.

查看更多
祖国的老花朵
3楼-- · 2019-02-01 17:49

After nine hours of hair pulling, cursing and burying my head in my hands... All I had to do was create a new project, transfer the files over by hand, and the error went away. Argh.

Update: My marking my own answer as correct does not mean these other answers were wrong - I didn't get a chance to try any of them.

查看更多
孤傲高冷的网名
4楼-- · 2019-02-01 17:51

I went straight to "but it seems to in the project settings, check in the build settings under CODE_SIGN_IDENTITIY, in my project the first line was set to a old profile but not visible in the list, only if you open the pulldown, after removing that it worked."

And that seems to have done the trick.

查看更多
疯言疯语
5楼-- · 2019-02-01 17:51

Its because of the SUDO permission you have given while adding the platform.

Follow this link Ionic Code Sign error: No unexpired provisioning profiles

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

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

查看更多
你好瞎i
7楼-- · 2019-02-01 17:53

Fixed it. Went to Project-> general-> found an option "no provisioning profiles found" Fix Issue button. Clicked it . Automatically fixed

查看更多
登录 后发表回答