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条回答
在下西门庆
2楼-- · 2019-01-10 01:55

If you are working with a project created by someone else as a template, you need to change the code signing identity

screenshot: http://i.stack.imgur.com/UIpGS.png (Xcode 4.2)

ps. OSX would not let me edit the .pbxproj file with a text editor

查看更多
Animai°情兽
3楼-- · 2019-01-10 01:57

Like @Jonathan, I just restarted Xcode and it worked after it automatically retrieved the profile from my Apple developer account. This was Xcode 6.2

查看更多
我想做一个坏孩纸
4楼-- · 2019-01-10 02:02

I just redid my provisioning profile and re-added devices to the portal in Organizer. Then I clicked my project icon, entered Build Settings, Code Signing and remapped to the new provisioning profile.

查看更多
贪生不怕死
5楼-- · 2019-01-10 02:05

In my case it was because the xcode 4.0.2 prevented deletion of stale data in the project.pbxpro in the *.xcodepro directory. I ended up hand editing the file after shutting down xcode. In the file I looked for all of the occurrences of "PROVISIONING", something like this:

PRODUCT_NAME = Xyzzy;
PROVISIONING_PROFILE = "CF5F0AEA-92D9-48E1-99DF-301AB36C2BFB";
"PROVISIONING_PROFILE[sdk=*]" = "CF5F0AEA-92D9-48E1-99DF-301AB36C2BFB";
SDKROOT = iphoneos;

and changed it to:

PRODUCT_NAME = Xyzzy;
"PROVISIONING_PROFILE[sdk=*]" = "";
SDKROOT = iphoneos;

I restarted xcode and the build succeeded with out issue. A word of caution make sure that you back up the project directory before make changes to the project files, and only hand edit the files when you have no other options.

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

This one can be fixed by changing the project settings AND clicking Project > Edit Active Executable > Build and changing the settings there.

查看更多
我欲成王,谁敢阻挡
7楼-- · 2019-01-10 02:08

what exactly is the error message? Did you add your device including the required provisioning profile in the organizer? What do you see in the organizer when selecting your iPhone under devices? It should be there with the correct valid profile...

查看更多
登录 后发表回答