Fortunately there is a little bit in the docs about the splash images, which put me on the road to getting the right location for the icon images as well. So here it goes.
Where the files are placed
Once you have built your project using command-line interface "cordova build ios" you should have a complete file structure for your iOS app in the platforms/ios/
folder.
Inside that folder is a folder with the name of your app. Which in turn contains a resources/
directory where you will find the icons/
and splashscreen/
folders.
In the icons folder you will find four icon files (for 57px and 72 px, each in regular and @2x version). These are the Phonegap placeholder icons you've been seeing so far.
What to do
All you have to do is save the icon files in this folder. So that's:
YourPhonegapProject/Platforms/ios/YourAppName/Resources/icons
Same for splashscreen files.
Notes
After placing the files there, rebuild the project using cordova build ios
AND use xCode's 'Clean product' menu command. Without this, you'll still be seeing the Phonegap placeholders.
It's wisest to rename your files the iOS/Apple way (i.e. icon-72@2x.png etc) instead of editing the names in the info.plist or config.xml. At least that worked for me.
And by the way, ignore the weird path and the weird filename given for the icons in config.xml (i.e. <icon gap:platform="ios" height="114" src="res/icon/ios/icon-57-2x.png" width="114" />
). I just left those definitions there, and the icons showed up just fine even though my 114px icon was named icon@2x.png
instead of icon-57-2x.png
.
Don't use config.xml to prevent Apple's gloss effect on the icon. Instead, tick the box in xCode (click the project title in the left navigation column, select your app under the Target header, and scroll down to the icons section).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…