Code Sign error: Provisioning profile can't be

2019-01-10 01:23发布

I have been working the whole day to try to build my app on my device.

I get this error when I try to build on my device.

I have been reading about this problem but do not really understand how to fix it. The following is where I would believe the problem is. I am new on this so I have no experience how to solve this.

When I open the "Dont Code sign" I have "Automatic profile selector (recommended)" with two lines I can select and also "My profile for dev" with one line to select. Do not know if this is where the problem is?

Any help is appreciated.

enter image description here

12条回答
可以哭但决不认输i
2楼-- · 2019-01-10 02:09

I had the provisioning profile set to one thing in Projects and another in Targets. Do a search in your project for the file that is missing and see if it pops up. No hand editing needed!

查看更多
相关推荐>>
3楼-- · 2019-01-10 02:10

Here's how I did it.

  • Shut down Xcode.
  • Back up the project.pbxproj file.
  • Edit the project.pbxproj file and remove lines of instances where it mentions the old provisioning profile.
    • eg. Delete line:
    • PROVISIONING_PROFILE = "8D024EDA-DC05-40DF-B3EB-536392615EE2";
  • Restart Xcode and perform a full clean of the project.
  • It should then build without warnings.

Enjoy!

查看更多
Luminary・发光体
4楼-- · 2019-01-10 02:11

I had this problem when I had to reissue development provisioning profiles with new names/ids.

The solution was to update all references in Edit Project Settings | Build (Code Sign) referring to Code Sign Developer (name). (Not Edit Active Executable.)

Click on the item(s) and check that the new profile is explicitly selected, and rebuild and run.

I suspect that the reason you get this error in the first place depends on whether or not you have set xCode up to try to resolve these dependencies automatically. In one of my builds replacing the profile was seamless - in the other I had to manually update it. Clearly the best solution would be a seamless one.

查看更多
smile是对你的礼貌
5楼-- · 2019-01-10 02:12

I've had this before, and it just worked by restarting Xcode. Probably won't work for you but I'll throw it out there anyway.

查看更多
混吃等死
6楼-- · 2019-01-10 02:13

I went and changed code signing identity the on project and target to "Don't Code Sign" and then changed back to the correct code signing identity. That fixed it for me.

查看更多
狗以群分
7楼-- · 2019-01-10 02:17

I had same error where the very previous build built just fine. I noted that my Build Settings -> Code Signing -> Provisioning Profile had been reset to strange one. All I had do is to point it to correct one to resolve the issue.

查看更多
登录 后发表回答