Skip to content

Instantly share code, notes, and snippets.

@ramingar
Last active May 5, 2016 10:03
Show Gist options
  • Select an option

  • Save ramingar/93f9a270316972e764eb to your computer and use it in GitHub Desktop.

Select an option

Save ramingar/93f9a270316972e764eb to your computer and use it in GitHub Desktop.
Generación de iconos en phonegap #phonegap #icon #splashscreen

Seen at http://stackoverflow.com/questions/23830467/generating-ios-and-android-icons-in-cordova-phonegap/24018833#24018833:

    <?xml version='1.0' encoding='utf-8'?>
    <widget>
        <icon src="www/res/drawable-xxxhdpi/icon.png" />
        <platform name="android">
            <icon src="www/res/drawable-ldpi/icon.png" density="ldpi" />
            <icon src="www/res/drawable-mdpi/icon.png" density="mdpi" />
            <icon src="www/res/drawable-hdpi/icon.png" density="hdpi" />
            <icon src="www/res/drawable-xhdpi/icon.png" density="xhdpi" />
        </platform>
        
        <platform name="ios">
            <!-- iOS 7.0+ -->
            <!-- iPhone / iPod Touch  -->
            <icon src="www/res/ios/icon-60.png" width="60" height="60" />
            <icon src="www/res/ios/[email protected]" width="120" height="120" />
            <!-- iPad -->
            <icon src="www/res/ios/icon-76.png" width="76" height="76" />
            <icon src="www/res/ios/[email protected]" width="152" height="152" />
            <!-- iOS 6.1 -->
            <!-- Spotlight Icon -->
            <icon src="www/res/ios/icon-40.png" width="40" height="40" />
            <icon src="www/res/ios/[email protected]" width="80" height="80" />
            <!-- iPhone / iPod Touch -->
            <icon src="www/res/ios/icon.png" width="57" height="57" />
            <icon src="www/res/ios/[email protected]" width="114" height="114" />
            <!-- iPad -->
            <icon src="www/res/ios/icon-72.png" width="72" height="72" />
            <icon src="www/res/ios/[email protected]" width="144" height="144" />
            <!-- iPhone Spotlight and Settings Icon -->
            <icon src="www/res/ios/icon-small.png" width="29" height="29" />
            <icon src="www/res/ios/[email protected]" width="58" height="58" />
            <!-- iPad Spotlight and Settings Icon -->
            <icon src="www/res/ios/icon-50.png" width="50" height="50" />
              <icon src="www/res/ios/[email protected]" width="100" height="100" />
        </platform>
    </widget>

Another interesting answer (icons, splashscreen): http://stackoverflow.com/questions/17820492/how-to-add-app-icon-within-phonegap-projects/31674547#31674547

Hook to copy icons to the compiled project: http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment