Blog's from the Bush
The ramblings of a lost technocrat...

iPhone Dev Tip#1 - ApplicationVerificationFailed

| 19 Comments | No TrackBacks

iPhone Developer PortalThis has bit me a few times so it's worth putting here, if only to remind myself. This problem is a bit obscure and it seems to only happen (for me at least) when starting a new project.

In it's vague and charming way Xcode will pop up and give you a warning message that the installation of your new iPhone project has failed.

Your mobile device has encountered an unexpected error (0xE800003A)

ApplicationVerificationFailed

As this only seems to occur when you first start the project - and because the signing process is not familiar to everyone, your first reaction will be to go through and check your build settings and re-enter them or even worse login to Apple's iPhone Developer portal and recreate your certificates. Don't Do This!

For whatever reason there appears to be a bug in Xcode 3.1 and the quickest and simplest way to resolve this problem is to open the Build menu and select the Clean All Targets menu item as shown below.

Clean All Targets (Xcode 3.1)

For whatever reason this clears the problem out.

But wait there's more...

This vague error message appears be caused by doing a Build before setting up your Info.plist file properly (although some people swear they never did a build before getting this error). Typically when you create a new iPhone App the default values in the Info.plist will be fine - all except for your Bundle Identifier. It typically looks like this when you open Info.plist in the Xcode default editor:

Default Bundle Identifier values

You will notice that rather than reflecting my correct domain identifiers it shows com.yourcompany. - ie. the default values. When the value of your Bundle Identifier is set correctly it will look something like this:

Completed Bundle Identifier

In this example, the sections before .${PRODUCT_NAME:identifier} , have been update tothe recommended reverse domain name string biz.craigphillips. This of course matches the App ID I created using the iPhone Program Portal.

As you would expect every time you change the bundle identifier to a value that doesn't match this could cause problems for you. The fact is though it doesn't happen immediately - if you build with the correct bundle identifier and the app installs on your iPhone all good, except that when you do a build after changing the bundle identifier it uses some cached information to verify the package that is installed. A few days later when you've forgotten that you changed the bundle identifier and find a need to "Clean All Targets" and re-build your app then it will break again.

This is easy enough to test - give it a go and see what happens.

For reference this has been happening since at least Xcode 3.1 through to 3.1.2 and iPhone OS 2.1 to 2.2.


No TrackBacks

TrackBack URL: http://www.lensenergy.com/cgi-bin/mt/mt-tb.cgi/113

19 Comments

Thanks. This post fixed my problem.

Cheers

I wish it had fixed it for me, but alas after spending a day trying to fix this, still no love. This provisioning process is way too obtuse.

There is no question that this can happen the first time a build is done when everything appears to be setup correctly prior to the build as this posting indicates. No swearing needed.

How do I know what my correct domain identifier is?

This did not work for me either. Still trying...

Probably the best place to start with identifying an appropriate domain identifier for your applications is understanding UTI's on the Apple Dev site.

Thank you so much! I have been running in to this problem and I couldn't find any good explanations as to the cause until I found your blog! You saved me lots of headaches and you'll have a repeat reader for sure!

THANKS a million for this... Resolved a really frustrating problem for me.

I ran into this problem as well and Clean All Targets did the trick. Thanks!

Brilliant. I've only been tearing my hair out for the last two days over this. It appears for me that the .${PRODUCT_NAME:identifier} but was the clincher! I now have Apple's WhichWayIsUp running on my partner's iPod Touch and can go to sleep a happy developer!

Thank you!! :o)
Just spent the last hour poking every setting we could find and nothing fixed it. Changed to using .${PRODUCT_NAME:identifier} and suddenly it works! :o)

Excellent! This was a big help... thank you. - Tom

Thanks Craig! for this very helpful suggestion. It really works..

I created my first hello world app for my iPhone and had to specify my app name in the Bundle ID as "com.mycompany.hello".

${PRODUCT_NAME:identifier} did not do it for me. Perhaps I'm missing some quirks, but with my app deployed to the phone successfully, I've nothing to complain.

@Melbourne You're welcome!

@Rajesh ${PRODUCT_NAME:identifier} is automatically replaced with the name of the product, the section proceeding that (the reverse domain entry) should as I understand it match the ID you created in the iPhone Dev. Portal.

You don't have to use the ${PRODUCT_NAME:identifier} at all and can use a static value. It just becomes more of an issue as your product evolves and changes.

THANK YOU! I can't imagine how many hours of troubleshooting you just saved me.

I had the same error, but for a different reason. Remember Entitlements.plist, that needs to be set for "Code Signing Entitlements" if you are doing an adhoc distribution? well I had the same value set for a regular development build.

So I had 3 different build configurations: debug, release and adhoc. I somehow set the entitlements value for my release build which was intended for just my phone. As soon as I deleted the the entitlements value for release build, everything was fine.

Interesting, I don't use a specific build for adhoc so I haven't encountered this problem. It's definitely worth noting.

Leave a comment

About the Author

 I've been described as a lost technocrat or a wondering luddite, personally I just like everything that takes us forward.


As the principal of CPPL I try to deliver OSS web solutions to our clients and Cocoa platform software for end-users and businesses alike. Oh, and we enjoy writing iPhone software.

Tweets

GetUp! Australia

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.31-en

About this Entry

This page contains a single entry by craig published on January 13, 2009 2:05 PM.

iPhone not showing up in iTunes was the previous entry in this blog.

Instruction Manual For Life is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.