Code Sign error: Provisioning profile can't be found

IphoneXcode4Code Signing

Iphone Problem Overview


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

Iphone Solutions


Solution 1 - Iphone

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!

Solution 2 - Iphone

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.

Solution 3 - Iphone

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.

Solution 4 - Iphone

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...

Solution 5 - Iphone

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

Solution 6 - Iphone

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.

Solution 7 - Iphone

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.

Solution 8 - Iphone

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.

Solution 9 - Iphone

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

Solution 10 - Iphone

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.

Solution 11 - Iphone

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!

Solution 12 - Iphone

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionPeterKView Question on Stackoverflow
Solution 1 - IphonejyapView Answer on Stackoverflow
Solution 2 - IphoneEddyView Answer on Stackoverflow
Solution 3 - IphoneBill VernonView Answer on Stackoverflow
Solution 4 - Iphoneuser387184View Answer on Stackoverflow
Solution 5 - IphoneTrevor JordetView Answer on Stackoverflow
Solution 6 - IphoneSean WallisView Answer on Stackoverflow
Solution 7 - IphoneJonathan.View Answer on Stackoverflow
Solution 8 - IphonezeeawanView Answer on Stackoverflow
Solution 9 - IphoneOh Danny BoyView Answer on Stackoverflow
Solution 10 - IphonegeekinitView Answer on Stackoverflow
Solution 11 - Iphoneuser3344717View Answer on Stackoverflow
Solution 12 - IphoneBcf AntView Answer on Stackoverflow