iTunes Icon for Ad Hoc Distributions

A common question that comes up from users who are testing ad-hoc / beta releases of iPhone apps, is why there is no icon for the applications in iTunes?

For ad-hoc builds of your application, by default, iTunes will display a generic icon for your application. The default artwork for an ad-hoc build looks as follows:

To add artwork so beta testers will see an icon within iTunes, you add a file with the name iTunesArtwork to your application bundle.

Add iTunes icon to Xcode Project:

* Create a png or jpg file that is 512×512 pixels
* In the Groups & Files list, right click on Resources group
* Choose Add, followed by Existing Files…
* Select the file you created, iTunesArtwork
* In the popup dialog, check Copy items into destination group’s folder
* Click Add

Clean and rebuild your project. When you add the application to iTunes, you should now see the artwork now tied to the application.

Caveats:
So the above sounds simple enough, which it is, however, there are a few gotcha’s that made this simple process go from what should of been 10 minutes of tinkering to an hour of hair pulling.

Let me point out the steps that may trip you up:

#1 – The file must be named iTunesArtwork with no extension, and don’t forget to capitalize the T and A (hmmm, there’s a joke in there somewhere).

#2 – I now know that you can’t start with a filename that has an extension of jpg or png and simply rename the file. For example, I had a 512×512 image that I created for the App Store. Seemed a reasonable assumption that if I renamed the file, everything would be copacetic. I went into Finder, right clicked on the file and removed the extension. No go. I could add to the project as shown above, however, the icon would not show up in iTunes.

After trying various file types (png, jpg), adding the file in different locations (root of the project, resources folder, etc), I decided to create a new image altogether thinking maybe the image was wonky. When saving the image in the image editor, I specified not to add a file extension. Shazam, that was the problem!

You’ll know if you’ve done this correctly as the file within the Resources folder will show up without an extension:

as compared to this:

#3 – There was a known bug within Xcode in an earlier version that generated the error 0xE8000058. This would happen when you switched from creating an ad-hoc build to a debug version and attempted to install on a device.

If you run into this error, remove the file iTunesArtwork from your application bundle (you can leave the file, just delete the reference to it) and rebuild.

  1. There’s another caveat too. If you’re using the iPhone Config Utility on OS 2, 2.1 and 2.2 iPhones or iPod touches for In-house Enterprise applications, it’ll throw an error if you try to give it iTunesArtwork.

    I’ve raised a bug about this and Apple asked me to upgrade to 3.0 – I have since told them they’ve missed the point

  2. Thanks for the tips!

    As for caveat #2, you can probably get around it by renaming the file from the command line, rather than from Finder. For example if your file is in your home directory, simply open Terminal and type the following:

    $ mv orig_image_name.png new_image_name

  3. Actually, as per your points 2 and 3, while I’m guessing, I bet I know what’s going on. You can rename it anywhere you want. Problem is if you’ve added the file with an extension, that file is marked in the metadata as a graphic file (use ‘Get Info’ to see what I mean.) Simply renaming the file and removing the extension does not change this. Continuing this thought, if you add a file that doesn’t have an extension, it does not get marked as a graphic file. (I believe I read somewhere that PNGs and such get some sort of compression at build time so when it’s not marked as a graphic, it leaves the file alone and thus it works.)

    I found this out when I was trying to add a zip file to our bundle. Kept crashing Xcode. Found out that when you add a zip, not only does it think it’s a framework, it also adds it to the ‘linking’ stage, not the copying stage, but what caused XCode to crash was that it was set to be indexed. By saying not to index it and moving it from the link to the copy stage as well as marking it as an archive, not a framework, voila! It worked! (That’s also why I’m guessing it’s identified wrong in the ‘get info’ dialog for your graphic.)

  4. Actually, I think the #2 gotcha is simpler still. Renaming a file inline in the Finder, and removing its extension, just raises the “hide extension” flag on the file, leaving the extension intact but invisible – if you get info (cmd+i) on the file, you can see this happening. And, if you rename the file within the get Info window, this doesn’t occur.

  5. Paul has it right. I didn’t know, however, that you could remove the extension in the “Get Info” window. I’ve been using the Terminal to rename mine.

  6. By using this i am able to change the Image. How can i change the tag “Unknown Genre”.
    Thanks in advance.

  7. Thanks for all this guys, really usefull, especially with the naming thing.

    Cheers

Comments are closed.