iPhone SDK 4 and the frayed ends of my sanity or: How I learned to relax and love undocumented techniques

Yesterday, I uploaded an update to one of my apps called Balloon Toss. It is a simple, novelty app that has been available on iTunes for more than 6 months. Unlike the app, the upgrade process was anything but simple. I was absolutely driven to the brink of insanity trying to figure out why iTunes Connect refused to accept my binary. This was neither my first app nor my first upgrade, and in the past things have gone relatively smoothly. Like many people, I experienced some frustration initially as I learned iPhone development, but this was more due to my inexperience and the learning curve than anything else. I, unlike some developers I’ve spoken to, feel that Apple’s documentation is decent and following it will lead to rather few issues. Unfortunately, I thought I did everything “by the book” but still received the following error when uploading to iTunes Connect.

The binary you uploaded was invalid. The application-identifier entitlement is not formatted correctly; it should contain your 10-character App ID Seed, followed by a dot, followed by your bundle identifier.

OK, this doesn’t look so bad. My initial thought was, “Maybe I accidentally changed something”. It uploaded fine for the previous version so I must have changed something inadvertently. I looked at my settings. Nope. Everything was as it was for the first version, except the version number of course. Next I figured Apple change the format and I needed to update the way I did things. I looked at the apple manual and sure enough I found… Nothing. Nothing that I could find changed. Now, I was getting frustrated. Quickly re-reading the error message, I was struck by one point I overlooked before, the word “entitlement”. Now I was confused, my “Entitlements.plist” file didn’t have an application identifier. I did a quick search online. Dead ends. I found the same question I had asked in the developer forums, but no answers. I kept looking. Finally I came across this blog by TwoAppGuys with a possible answer. I tried the solution outlined on the blog and voila, behold a successful upload. To be fair, I actually found the blog entry by first finding this one at dosomethinghere.com so thanks guys I really appreciate it.

I did need to make one change for it to work for me. Here are the steps I took to solve this problem. TwoAppGuys showed how to do this by manually editing the xml in the “entitlements.plist”. I simply did it in xcode’s built in plist editor.

Here is what my entitlements.plist looked like initially.

my beginning entitlements.plsy

This how my "entitlements.plist looked before editing

Here is what TwoAppGuys suggested. Add the key: application-identifier with a string value of: ##########.com.companyname.appname where the #’s represent your app seed.

plist with TwoAppGuys' recommendation

This is what the "entitlements.plist" looks like with the suggestions made by TwoAppGuys

I needed to make one change to get it to work. When I tried the method outlined above, I still received an error. However, after once again re-reading the error I realized it specifically said “ it should contain your 10-character App ID Seed, followed by a dot, followed by your bundle identifier”. So, instead of a string value of: ##########.com.companyname.appname I tried removing the “.com.companyname”. This left me with a string value of: ##########.appname and that finally uploaded without any errors.

my final plist

This is the format that worked for me

Now, I just need to keep my fingers crossed that everything else works out and Balloon Toss 1.5 is approved this week by Apple.

About the Author