Friday 12 October 2012

Icon missing when uploading PhoneGap app to Apple

Problem:

When I upload my Cordova app to Apple for review, I get the following error:
Invalid Image Path - No image found at the path referenced under key "CFBundleIcons": icon-72@2x.png

Solution:

This error seems to be caused because a reference to icon-72@2x.png is present in the icon list of your Cordova XCode project, however the icon has not been added to the project itself by the script that created the project.

To add this icon, simply open your project in XCode, find (or add) the icon to the Resources->icons folder of your project, then drag-and-drop this into the appropriate spot in your XCode project. Note that this icon needs to be 114x114 pixels.

Here are example screenshots of the icon-72@2x.png missing, and adding this icon to your Cordova XCode project. Hopefully someone out there finds these useful :)

Notice that the icon is missing ...

Drag-and-dropping the icon into the project.

Notes:

An alternative solution to this problem is to remove the reference to the image in the icon list. However, it may be useful to render this icon and add it to your project nonetheless. This bug was found and tested in PhoneGap/Cordova 2.0.0 using XCode 3.5. The original project itself was upgraded from an earlier PhoneGap 1.5.0 project.

Reference:

https://groups.google.com/forum/?fromgroups=#!topic/phonegap/51CYGyjj_pU
(Being relatively new to XCode, I wasn't exactly sure how to follow the brief instructions at the above link at first, which is why I created this how-to in order to help out others in a similar situation.)

2 comments:

  1. Jeez! that my friend it's a silly bug that fooled me for a couple of minutes!!
    Thanks for pointing that out :)

    Affected: Cordova 2.2.0

    Frank

    ReplyDelete
    Replies
    1. agreed about the silly bug ... I'm glad the blog post came in handy, Frank! =)

      Delete