0

I have seen a lot of different approaches to this but none seem to work for me. What is the straightforward way to set iOS app icons for a vanilla touch 2.3.1 + phonegap project with cmd 4? I have all the files in /resources/icons and have set the appropriate paths in /config.xml like this:

 <icon gap:platform="ios" height="57" src="resources/icons/Icon.png" width="57" />
<icon gap:platform="ios" height="72" src="resources/icons/Icon-72.png" width="72" />
<icon gap:platform="ios" height="114" src="resources/icons/Icon@2x.png" width="114" />
<icon gap:platform="ios" height="144" src="resources/icons/Icon-72@2x.png" width="144" />

but no dice even with variations of "www/resources", "../resources" etc. is there some kind of cache that needs to be cleared? What about for splash and loading icons too? This seems to be a hole in the docs.

Thanks!

patrickkidd
  • 2,797
  • 2
  • 19
  • 19

2 Answers2

0

I guess you are using wrong size. Try one of these:

<platform name="ios">
    <!-- iOS 7.0+ -->
    <!-- iPhone / iPod Touch  -->
    <icon src="res/icon/ios/icon-60.png" width="60" height="60" />
    <icon src="res/icon/ios/icon-60@2x.png" width="120" height="120" />
    <!-- iPad -->
    <icon src="res/icon/ios/icon-76.png" width="76" height="76" />
    <icon src="res/icon/ios/icon-76@2x.png" width="152" height="152" />
    <!-- iOS 6.1 -->
    <!-- Spotlight Icon -->
    <icon src="res/icon/ios/icon-40.png" width="40" height="40" />
    <icon src="res/icon/ios/icon-40@2x.png" width="80" height="80" />
    <!-- iPhone / iPod Touch -->
    <icon src="res/icon/ios/icon.png" width="57" height="57" />
    <icon src="res/icon/ios/icon@2x.png" width="114" height="114" />
    <!-- iPad -->
    <icon src="res/icon/ios/icon-72.png" width="72" height="72" />
    <icon src="res/icon/ios/icon-72@2x.png" width="144" height="144" />
    <!-- iPhone Spotlight and Settings Icon -->
    <icon src="res/icon/ios/icon-small.png" width="29" height="29" />
    <icon src="res/icon/ios/icon-small@2x.png" width="58" height="58" />
    <!-- iPad Spotlight and Settings Icon -->
    <icon src="res/icon/ios/icon-50.png" width="50" height="50" />
    <icon src="res/icon/ios/icon-50@2x.png" width="100" height="100" />
  </platform>



<!-- iOS 7.0+ -->
  <!-- iPhone / iPod Touch  -->
  <icon src="res/icon/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
  <icon src="res/icon/ios/icon-60@2x.png" gap:platform="ios" width="120" height="120" />

  <!-- iPad -->
  <icon src="res/icon/ios/icon-76.png" gap:platform="ios" width="76" height="76" />
  <icon src="res/icon/ios/icon-76@2x.png" gap:platform="ios" width="152" height="152" />

  <!-- Settings Icon -->
  <icon src="res/icon/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
  <icon src="res/icon/ios/icon-small@2x.png" gap:platform="ios" width="58" height="58" />

  <!-- Spotlight Icon -->
  <icon src="res/icon/ios/icon-40.png" gap:platform="ios" width="40" height="40" />
  <icon src="res/icon/ios/icon-40@2x.png" gap:platform="ios" width="80" height="80" />

  <!-- iOS 6.1 -->
  <!-- iPhone / iPod Touch  -->
  <icon src="res/icon/ios/icon.png" gap:platform="ios" width="57" height="57" />
  <icon src="res/icon/ios/icon@2x.png" gap:platform="ios" width="114" height="114" />

  <!-- iPad -->
  <icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
  <icon src="res/icon/ios/icon-72@2x.png" gap:platform="ios" width="144" height="144" />

  <!-- iPhone Spotlight and Settings Icon -->
  <icon src="res/icon/ios/icon-small.png" gap:platform="ios" width="29" height="29" />
  <icon src="res/icon/ios/icon-small@2x.png" gap:platform="ios" width="58" height="58" />

  <!-- iPad Spotlight and Settings Icon -->
  <icon src="res/icon/ios/icon-50.png" gap:platform="ios" width="50" height="50" />
  <icon src="res/icon/ios/icon-50@2x.png" gap:platform="ios" width="100" height="100" />
Baidaly
  • 1,829
  • 1
  • 15
  • 16
  • Please see my comment under Anand Gupta's answer, I think it applies here. – patrickkidd Apr 13 '15 at 16:01
  • UPDATE: I got it working using your file above AS WELL AS manually copying /resources to /phonegap/resources. It appears that sencha build does not copy this folder when running "sencha app build native" for phonegap builds. And FWIW an existing Xcode project is properly updated with that same sencha build command when the resources folder exists in the phonegap folder. I'll file a bug with sencha. Thanks! – patrickkidd Apr 13 '15 at 17:31
0

I have listed down all the required resolution, name of icons and name of splash screens. enter image description here

After naming all PNG files you need to put into the icons and splash folder which you can find in /ExampleApp/Platform/ios/ExampleApp/Resources folder.

For more details on your issues, you should read and follow this.

Anand Gupta
  • 5,640
  • 3
  • 27
  • 37
  • I'm confused. Are you suggesting that sencha's phonegap build system won't add any icons at all if I don't have all of them listed? My icon sizes are properly listed in the table above. Also, the link you suggested is for phonegap only, not sencha + phonegap, and I am using sencha to build it via phonegap. – patrickkidd Apr 13 '15 at 15:42
  • Also, is the Xcode project updated with changes made here, or do you have to delete and regenerate the Xcode project first? Is there actually a document anywhere that addresses these issues directly? I can't find one. – patrickkidd Apr 13 '15 at 16:02
  • Yes @patrickkidd , It is for Sencha and Phonegap. But the approach followed here is, we have created separate phonegap project and used the sencha build in that phonegap project. It is to demonstrate that with any js build, we can make phonegap project. – Anand Gupta Apr 14 '15 at 04:49
  • And you have to delete the build and regenerate it. – Anand Gupta Apr 14 '15 at 04:49