Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iPhone SDK CodeSign Error

I have been using the iPhone SDK and the app. runs on the sim, but it will not allow me to test it on the device. I get an CodeSign Error. How do apply the Developer cert.?

iPhone, Mac OS X (10.5.2)

Posted on Mar 23, 2008 4:20 PM

Reply
64 replies

May 12, 2009 12:14 AM in response to Lee2

Sorry for the very late reply to the question Lee asked, I've not checked the forum for months, but will post a response, just for posterity. It might help someone some time.
I have to manually edit the new codesign script which anyone with a PPC would have had to hack to get things to work.
When building for an appstore submission, I have to use Terminal, and then
cd /usr/bin
vi codesign

If you don't like Vi, use whatever editor you are happy with.
You need to comment out these lines:
system("rm $appDir"."/CodeResources");
system("cp $appDir"."/_CodeSignature/CodeResources $appDir"."/CodeResources");

Use the # character, so they end up looking like this:
# system("rm $appDir"."/CodeResources");
# system("cp $appDir"."/_CodeSignature/CodeResources $appDir"."/CodeResources");

In case whoever's reading this isn't familiar with Vi, you hit the i key to go onto insert mode, then scroll down to where those two lines are and put the # character in front of each line.
To save and quit you need the following
esc:wq
that is, hit the escape key, then colon followed by the w and q keys.
You should now be able to compile your app and have it accepted by the AppStore.
I usually check my app before I try to submit, by opening another terminal window, and going to the folder where my application is and verifying it,
codesign -vvvv appname.app
codesign -dvvv appname.app
Execute both of those to check your app, and if everything comes up saying it's all signed and good, then you should be right to submit.
That process has got me 6 apps submitted and approved with no worries so far.
Oh also, don't forget to then go back in to codesign and remove those comment characters, so you can compile for developing. It's a bit of a pain, but better than forking out for a new computer.
I might have to do that though with this new OS 3.0 SDK, I don't know how that's going to go on my PPC G5 😟

May 12, 2009 9:03 PM in response to Dev123456

Hopefully this helps someone out there. I figure that, even a year after the original post, if I'm encountering the same problem them others might be too...

So, after 8 hours I finally managed to get my applications to transfer to my Touch without errors. There are tons of suggestions around, both here and a multitude of other places, but nothing quite got rid of that darn "0xE800003A applicationverificationfailed" error.

Then I found an offhand reference to PROVISIONING_PROFILE in a forum somewhere... And this wouldn't be the first time I had messed-up Xcode project files that I had to edit by hand.

So this is what I did to finally solve my problem:

Right-click your Xcode project file "MyApp.xcodeproj" and select "Show Package Contents".

Make a copy of project.pbxproj, just in case.

Edit project.pbxproj and change/remove any lines that are like the following:

buildSettings = {
...
"CODE SIGNIDENTITY\[sdk=iphoneos*\]" = "iPhone Developer: FirstName LastName";
"PROVISIONING_PROFILE\[sdk=iphoneos*\]" = "XXXXXXXX-1111-YYYY-2222-ZZZZZZZZZZZZ";
...
};

I actually often had multiple lines for each of CODE SIGNIDENTITY and PROVISIONING_PROFILE. But in each case you only want one of each with none of that "sdk = stuff":

buildSettings = {
...
"CODE SIGNIDENTITY" = "iPhone Developer: FirstName LastName";
"PROVISIONING_PROFILE" = "XXXXXXXX-1111-YYYY-2222-ZZZZZZZZZZZZ";
...
};

You'll probably have at least two sets of these lines, once for Release and once for Debug.

Once I did this, cleaned my project and ran it, I suddenly had the codesign script asking for permission to access my keychain. Of course I gave it permission and suddenly I had my application on my Touch. Woo Hoo!

One thing I've noticed is that if I want to upload a new build to my Touch that I need to first delete the old version from my Touch directly or I get the same old applicationverificationfailed error again. (hold finger on app icon for a few seconds, wait for little X's to appear, click the X on my app and delete).

Also, make sure that you're using a correctly copied version of Tiku's script, along with the modifications above to handle spaces in names. I screwed up something along the way that contributed to finding my problem.

Finally, I also found this blog posting very useful (it was a reply that lead me to my solution):
http://www.24100.net/2009/02/iphone-sdk-mobile-provisioning-0xe800003a-0xe800000 1/

Good Luck!

May 19, 2009 8:11 PM in response to chappell

Correct, it is fixed in 10.5.7. I couldn't follow up on my bug report post earlier, due to the beta 10.5.7 builds being under NDA. I think it may have been fixed in a previous release if you had installed the Combo update rather than the Delta update. I had installed only Delta updates on my 10.5.6 system that was exhibiting the problem, and I got the impression that it could not be reproduced on a 10.5.6 system that was upgraded using a Combo update.

iPhone SDK CodeSign Error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.