This error will appear when you update your provisioning profile in iPhone SDK 2.2
or after the expiration of developer certificate and that you have a new provisioning profile from the developer portal
This is the solution (which is modified from http://www.furmanek.net/54/iphone-sdk-22-codesign-error/)
Suppose you have copied your provisioning profile called "iPhone_Development.mobileprovision" to the Library folder and build & go an old iPhone project called "MyApp", and this annoying error appears
(1)
cd ~/Library/MobileDevice/Provisioning\ Profiles/
(2) find out the UUID of the provisioning profile
strings iPhone_Development.mobileprovision | grep "<string>.*-.*</string>"
output is like this
<string>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</string>
(3) copy that UUID between the string tag
(4) close xcode and go to your project
cd ~/Projects/MyApp/MyApp.xcodeproj
(5) Use a text editor to open the project.pbxproj
find the string PROVISIONING_PROFILE
paste the UUID that you copied from step (3) and put it in both Debug and Release Sections (do multiple finds) for the following line
e.g.
PROVISIONING_PROFILE = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
(6) Launch XCode and open the project and build & go again
Updates :
Deleting all of the lines "PROVISIONING_PROFILE" in project.pbxproj will also fix the problem for iPhone SDK 3 or above
41 comments:
You're my hero !!!!!!
Thanks so much. This came up in a Google search for the error string and it's been a great help -- the last step I needed before getting my app to run on my iPod Touch. The only info to add is that users should do multiple finds for PROVISIONING_PROFILE, as my pbx file had four separate instances that needed fixing.
Very very helpful.
A million thanks. I was putting off trying to fix this problem, and you just saved me countless hours of frustration. I even cleaned up a bunch of old, useless PROVISIONING_PROFILE lines while I was there.
The PROVISIONING_PROFILE settings may be vestigial. New projects don't acquire them and simply deleting them fixed it for me; your mileage may vary. Nice of Apple to exclude these from the Info panes. >:-(
Thank you! That helped me a lot :D
I can't imagine how long this would've taken me to fix without this post. Your blogging is much appreciated.
Awesome, thank you so much!!!
Add me to the "exceptionally grateful" list. The problem apparently still exists with SDK 2.2.1. I had to update the provisioning profiles to add a developer and all heck broke loose until I found this.
I can stop restoring iPhone now.
Doood.... Deleting all of the lines fixed it for me. Thanks a million!
I have the same problem but I can't find the project.pbxproj file. Where is it?
It worked!!!! Thank you so much. Now, if you could help me with CSSMERR_TP_NOT_TRUSTED error message that would be perfect. Thanks again.
Adrian
You're a life saver this has been screwing me up for a few days now.
I'm also very grateful for your post. I can't believe Apple has made it this hard just to change provisioning profiles! I can't wait until I start pushing out beta copies of my app...
legend.
Fantastic! So glad I found this...
nice collection
Wow, I was going crazy until I found this and now I finally can test my app on my iPhone again. Thanks so much!!
Nice post
Thanks a ton... fixed the problem beautifully. I wouldn't have had a chance of finding it if you hadn't posted this.
In the project file it appears that there are 2 sets of build configs (PBXProject, PBXNativeTarget). When my partner modified the provisioning profile and updated the project for it, it appears that it affected only one of these 2 sets.
So when I did "Get Info" on the target object in the project window, I saw an incorrect/vestigial entry in the Build tab for the code signing identity with the old profile UUID. When I just selected the correct one in the menu, it worked. I have no explanation for how it worked like that in my partner's setup...
Worked with me. Using XCode for OS 3 beta 4. Thank you!
Thanks a lot! I have to use it a lot, please keep this site online :)
incredible awesome post searched the web for hours without avail first class!
It worked for me too, Much Thanks !
Thanks for this. Definitely helped when changing profiles.
Add me to the "exceptionally grateful" list, too!!! Spend hours before finding your extrem helpful link. THX!
I love you! i love internet! :-))))))))
4 hours lost in my live and in this post i find the solution!!
Thanks!!!
Thank you so much! I lost a whole bunch of time over this, and kept creating and recreating new certificates and provisioning profiles to try and solve it.
I just deleted all the PROVISIONING_PROFILE lines and it started compiling! Thank you!
Thank you thank you thank you.
Thanks so much - you just saved me a huge amount of work. You're a god!!!
Does not work with iphoneOS 3.1.2. Anyone accomplished deleting PROVISIONING_PROFILE worked with xcode 3.1.4 and iphoneOS 3.1.2? Im on 10.5.8 iAtkos. thanks
Worked for me too, thanks :-)
YOU ARE A GENIUS!!!!!!
You saved me so many hours.... umbelivable!
Thanks!!!
I also had to change lines of the form:
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Don't Code Sign";
to
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
as it appeared there were duplicated sections and it did not seem possible to do so from within xcode. (don't ask why as this was for a 3rd party project I downloaded from a book)
Thank you!!! This has saved me twice.
Works like a charm! Wonderful. I wasted one day in fixing this & finally found this to work.
Thanks a ton.
Works on IOS4 also...
I would note that on yourApp.xcodeproj you have to right click and "Show Package Contents" to see the project.pbxproj file.
Also, I didn't delete the lines with PROVISIONING_PROFILE in them. I had...
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
...and replaced "" with my correct profile.
Thanks a million!!!
Thanks for the nice information. I am sure, I will tweet this to my twitter account. This will help a lot of users.
Select xcodeproj in xCode 4. Under "Build Settings", find the "Code Signing" section and choose your developer certificate. Swoosh! The error disappears
Nice Post. Thanks for sharing
Post a Comment