cordova - How to add app icon within phonegap projects? -
i created new phonegap (v 3.0.0-0.14.0) project default config.xml , added ios , android platforms.
the config contains paths platform icons.
i have overwritten default icons ios , android path , name still matches pngs.
when running in simulator icons don't show up. have looked in xcode tells me "resources" folder icons still contains phonegap default icons. same android.
what doing wrong?
how can add custom app icons ios , android phonegap?
thanks
my config.xml
<icon src="icon.png" /> <icon gap:density="ldpi" gap:platform="android" src="res/icon/android/icon-36-ldpi.png" /> <icon gap:density="mdpi" gap:platform="android" src="res/icon/android/icon-48-mdpi.png" /> <icon gap:density="hdpi" gap:platform="android" src="res/icon/android/icon-72-hdpi.png" /> <icon gap:density="xhdpi" gap:platform="android" src="res/icon/android/icon-96-xhdpi.png" /> <icon gap:platform="ios" height="57" src="res/icon/ios/icon-57.png" width="57" /> <icon gap:platform="ios" height="72" src="res/icon/ios/icon-72.png" width="72" /> <icon gap:platform="ios" height="114" src="res/icon/ios/icon-57-2x.png" width="114" /> <icon gap:platform="ios" height="144" src="res/icon/ios/icon-72-2x.png" width="144" /> <icon gap:platform="blackberry" src="res/icon/blackberry/icon-80.png" /> <icon gap:platform="blackberry" gap:state="hover" src="res/icon/blackberry/icon-80.png" /> <icon gap:platform="webos" src="res/icon/webos/icon-64.png" /> <icon gap:platform="winphone" src="res/icon/windows-phone/icon-48.png" /> <icon gap:platform="winphone" gap:role="background" src="res/icon/windows-phone/icon-173.png" />
fortunately there little bit in docs splash images, put me on road getting right location icon images well. here goes.
where files placed once have built project using command-line interface "cordova build ios" should have complete file structure ios app in platforms/ios/
folder.
inside folder folder name of app. in turn contains resources/
directory find icons/
, splashscreen/
folders.
in icons folder find 4 icon files (for 57px , 72 px, each in regular , @2x version). these phonegap placeholder icons you've been seeing far.
what do
all have save icon files in folder. that's:
yourphonegapproject/platforms/ios/yourappname/resources/icons
same splashscreen files.
notes
after placing files there, rebuild project using
cordova build ios
, use xcode's 'clean product' menu command. without this, you'll still seeing phonegap placeholders.it's wisest rename files ios/apple way (i.e. icon-72@2x.png etc) instead of editing names in info.plist or config.xml. @ least worked me.
and way, ignore weird path , weird filename given icons in config.xml (i.e.
<icon gap:platform="ios" height="114" src="res/icon/ios/icon-57-2x.png" width="114" />
). left definitions there, , icons showed fine though 114px icon namedicon@2x.png
instead oficon-57-2x.png
.don't use config.xml prevent apple's gloss effect on icon. instead, tick box in xcode (click project title in left navigation column, select app under target header, , scroll down icons section).
Comments
Post a Comment