« Tweets for Today | Main | red:green Submitted to iTunes App Store »

July 18, 2008

The Nightmare that is iPhone Code Signing

iPhone SDKI spent most of the day prepping for iPhoneDevCamp 2 and being able to offer the ability to distribute free open source apps to the iTunes store from people who don't wish to use their iPhone Developer account for experimental or free software. I'm also hoping to be able to set up ad-hoc distribution, so that apps for the Hackathon Contest can be shared during the conference.

I decided to offer as my first iPhone application a very simple app called red:green inspired from an idea by Jerry Michalski. It is basically a native version of the red:green web app that I helped some participants with at last year's iPhoneDevCamp.

The application is very simple, it just displays a green screen for approval, and a red screen for dismay. The programming for it probably took an hour or so, and doing some simple polish of the about box and some little things added maybe two.

However, dealing with the code signing issues so that I could test it on the iPhone rather then Simulator, and today to send it to the iTunes App Store have been a nightmare. First at WWDC when I got approved for the iPhone Developer Program, I probably spent 6+ hours just trying to get code signing working for the Debug profile so that Xcode can load applications on my iPhone for testing. A number of Apple employees tried to help, but were unable to get it to work. Finally, another iPhone developer on the show floor was able to help me get it running.

However, several times since then the code signing setup has mysteriously broken, and I've need to reboot my iPhone and my Mac, or even reset up Xcode.

Some of the problem is the arcane, confusing, and poor documentation on how to code sign iPhone apps using Xcode, but most of it is the clunky setup of various keys, certificates, provisioning profiles, build properties, etc. that is required to get things to work. Of course, it is difficult to get help online or from fellow developers because the iPhone SDK is still under NDA (another sore subject.)

Today, after getting everything working with the latest SDK, testing on the simulator and on both the iPhone and iPod Touch, I spent maybe 3-4 hours setting up the Application and Support web pages for the red:green app, as well as all the graphics, text, and icons required for the iTunes App Store.

Then I had to through the whole code signing process again to get the Distribution profile working for the App Store with a whole new set of certificates and provisioning profiles.

Everything was working, and Xcode was reporting that it signed my red:green app without an error. I uploaded all my text and graphics to iTunes. I thought I was home free. However, when I got to the very last step for submission and used the iTunes Application Uploader, it reports "Application red-green.app failed codesign verification". I have no idea what is wrong, as everything seems to be set up right.

I've gone through all the docs again to make sure I didn't miss any trivial thing, but nothing obvious so far. But so many things have been done to my project file to get signing to work, especially since it was originally iPhone SDK Beta 7 that I first got it working for my Debug profile. So tonight before I go to bed I'm going to re-download the final iPhone SDK, delete my old SDK and do a install fresh. Then in the morning I'm going to rebuild my application from scratch using the latest iPhone SDK template, and copy my code by hand over to the new project. Then hopefully the default project settings for a brand new project from the final SDK will all work correctly for me to be able to sign and submit the app to the App Store by the weekend.

If I can't get that to work, I'll have to resort to using one my my precious ADC Support Incidents, which I hate to use on something that should be trivial.

So far, 1 hour coding, 2 hours polish, 1 hour testing, 4 hours for required text graphics & websites — all relatively fun and interesting. Add to that maybe another 10 frustrating hours dealing with code signing which still does not work.

Wish me luck.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341d8bc053ef00e553c345938834

Listed below are links to weblogs that reference The Nightmare that is iPhone Code Signing:

» red:green Submitted to iTunes App Store from Christopher Allen's Ephemera Blog
So after quite a bit of work and going through all the property details of my project file, I found the error. As I was suspicious might to true, it was a property that was set by some colleagues at [Read More]

Comments

Nice article! I just bought the iPhone Developer's program myself, so I'll be having to go through all the hassle of setting it up as well.I did have one gotcha already. I got an "unable to verify identity error" when trying to activate my enrollment. If you have some suggestions as to how to get everything working after I get this issue sorted out, I'd love to hear them!

Chris

I totally wish you luck. I'm in a very similar situation on an app update. I've "progressed" against 6 different errors in iTunesConnect.

Might stop by the iPhoneDevCamp to see how you're doing...Good luck!

So... what was the solution?
Im new on this SKD. I come from ActionScript, so am a real new one at this technologies, but come very very interested on step up from the actual error.
I would like to know if I have to sign the Info.plist file or what file, also why is looking the compiler for an iPhone Developer certificate and why even doing and signing with a new certificated called iPhone Develper, it still out of working. However, this page was one of my first google options. Ill get this bookmarked.

I can't agree more. I put in almost 50 hours to get 4 different apps submitted to the App Store. After that I thought for sure I was a pro at it. But, alas, my next attempt at Ad Hoc failed miserably...

In my experience the certificates and keys are fragile. I have "had" to reinstall my keys multiple times as xCode stops being able to reference them. No clue what causes all of this.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.

My Photo

About Me

Blogosphere

  • Add to Technorati Favorites

Latest Posts on Life With Alacrity

Blog powered by TypePad
Member since 01/2004