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!


-도시

24 comments:

  1. This helped me so much. Thanks!

    ReplyDelete
  2. I also found it works! I try to solve it almost 2 weeks but in vain...now works. But just wonder what action in xcode will this provision_profile lines be written to file?

    thomas

    ReplyDelete
  3. THANK YOU THANK YOU THANK YOU

    ReplyDelete
  4. You've saved me from several hours of misery. Thanks

    ReplyDelete
  5. Thanks here as well.... This save me some time... thanks so much!

    ReplyDelete
  6. Thank you so much! That was exactly what I needed after the following didn't work for me:
    http://www.iphonedevsdk.com/forum/iphone-sdk-development/21137-updated-3-0-now-provisioning-profile-cant-found.html

    ReplyDelete
  7. Thank you. I solved terrible error for your posting.
    Thank you very much!!

    ReplyDelete
  8. You are a God. You have made life worth living again. I can't tell you how desperate I was, or how filled with joy I am now. Seriously. Thank you.

    ReplyDelete
  9. Thanks so much. I wonder how come after 2 years and surely thousands of complaints apple hasn't simplified the selection of the appropriate provisioning profile.

    ReplyDelete
  10. Thank you SO MUCH! Your post just made my day! I was struggling with this for days!

    For all those who got help from this post, I sure hope you gave something back to this poster -- in the form of a single click.
    Don't be a leech and support this great man!

    ReplyDelete
  11. You are the man! It works! I was struggling with this all night after getting a new phone and having issues with my keys. Thank you very much!

    ReplyDelete
  12. A big hug and kiss!!!!

    ReplyDelete
  13. I had my app running on the iPod Touch this morning, after many, many gyrations. Then decided to 'clean up' some of the certificates and things that lay strewn about my dev environment. Terrible mistake. Hours have passed -- I could see what was wrong but not how to fix it. This worked!

    THANK YOU

    ReplyDelete
  14. Hi, I'm not able to open the. xcodeproj in my text editor. I have TextWrangler and TextEdit, of which neither work.

    Any ideas?

    Thanks!

    ReplyDelete
  15. THANK YOU SO MUCH! THANK YOU!!!!!!!

    ReplyDelete
  16. Thanks! Saved my day

    ReplyDelete
  17. BIG BIG BIG THAAAAAANKS!!! =))))

    ReplyDelete
  18. Thank you so much dude.

    ReplyDelete
  19. I tried your method. The code sign error is gone now. but I am getting new error "Error Starting Executable". :(

    ReplyDelete