Wednesday, August 12, 2009

iPhone Code Sign Error : Provisioning Profile Can't be Found!

Code sign error : Provisioning profile 'ABCD-12345-XYZ' can't be found.
If you have encountered an error that reads as above, you probably went through some frustrating time as I did. This error is a different class of error than the one I have previously posted about.

If you get an error message that reads as below, check out my previous post.
Error: Can’t run ‘XYZ’ on the device ‘Developer iPhone’ The device doesn’t have provisioning profile the application was signed with. Add the provisioning profile to this advice via the Organizer, or check the ‘Code Signing Identity’ build setting.

Now back to the main issue. How do you solve a code sign error that says provisioning profile can't be found?

After numerous tries of doing virtually everything, the simplest solution is to follow the steps below.
  1. Open up the Terminal
  2. CD into your iPhone project directory
  3. CD into YourApp.xcodeproj
  4. Edit the file project.pbxproj by using a text editor (I use vi)
  5. Search for the string PROVISIONING_PROFILE
  6. Surround the line containing PROVISIONING_PROFILE, with /* */ (comment block). You can simply erase the line, but I prefer to put it in comments.
  7. Do this for all lines containing PROVISIONING_PROFILE
  8. Save file.
This should have done it! Open your Xcode project -> build and go. And remember to take a break!


-도시