Results 1 to 4 of 4

Thread: icons and splash screen in Cordova builds

  1. #1
    Sencha User
    Join Date
    Nov 2013
    Posts
    3

    Default icons and splash screen in Cordova builds

    Where and how to define icons and splash screens for native Cordova platforms builds when creating them using the Sencha wrapper for Cordova (`sencha cordova init`, `sencha app build native`)?
    Where these assets should be placed?

    Is it possible to configure in the way that all icons and splash screens will be placed automatically in platform builds without doing this manually after each rebuild of Sencha app? (e.g. in case when something has been changed in JS and I want to get new native Cordova platforms builds for iOS and Android).

  2. #2
    Sencha - Services Team Stju's Avatar
    Join Date
    Dec 2008
    Location
    Redwood city, California
    Posts
    293
    Answers
    2

  3. #3

    Default Auto add icon & splash screen to Sencha Touch / Cordova App with native build

    Place the corresponding images files into your sencha_app/resources folder and add this code to your sencha_app/cordova/config.xml

    Ref.: http://cordova.apache.org/docs/en/3....lash%20Screens

    Exemple for the icons :

    Code:
        <platform name="ios">
            <!-- iOS 7.0+ -->
            <!-- iPhone / iPod Touch  -->
            <icon src="../resources/icons/ios/icon-60.png" width="60" height="60" />
            <icon src="../resources/icons/ios/[email protected]" width="120" height="120" />
            <!-- iPad -->
            <icon src="../resources/icons/ios/icon-76.png" width="76" height="76" />
            <icon src="../resources/icons/ios/[email protected]" width="152" height="152" />
            <!-- iOS 6.1 -->
            <!-- Spotlight Icon -->
            <icon src="../resources/icons/ios/icon-40.png" width="40" height="40" />
            <icon src="../resources/icons/ios/[email protected]" width="80" height="80" />
            <!-- iPhone / iPod Touch -->
            <icon src="../resources/icons/ios/icon.png" width="57" height="57" />
            <icon src="../resources/icons/ios/[email protected]" width="114" height="114" />
            <!-- iPad -->
            <icon src="../resources/icons/ios/icon-72.png" width="72" height="72" />
            <icon src="../resources/icons/ios/[email protected]" width="144" height="144" />
            <!-- iPhone Spotlight and Settings Icon -->
            <icon src="../resources/icons/ios/icon-small.png" width="29" height="29" />
            <icon src="../resources/icons/ios/[email protected]" width="58" height="58" />
            <!-- iPad Spotlight and Settings Icon -->
            <icon src="../resources/icons/ios/icon-50.png" width="50" height="50" />
            <icon src="../resources/icons/ios/[email protected]" width="100" height="100" />
        </platform>
        <platform name="android">
            <icon src="../resources/icons/android/ldpi.png" density="ldpi" />
            <icon src="../resources/icons/android/mdpi.png" density="mdpi" />
            <icon src="../resources/icons/android/hdpi.png" density="hdpi" />
            <icon src="../resources/icons/android/xhdpi.png" density="xhdpi" />
        </platform>
    Than, build your app using Sencha cmd :
    Code:
    sencha app build native
    After that, you only have to manage the images on the sencha_app/resources folder and build to populate the sencha_app/cordova/platform/... folder

    Note : I use Sencha cmd v 4.0.2.67 and Cordova 3.5

  4. #4

    Default

    ist that complicated, in SA 3.0 there was function to implement this automatically. And now with the cordova and phonegap i have to generate a lot of image files by hand with Photo Shop ? LOL . SA 3.1 and CMD 5.x are defintely worse for packaging native. I am gonna be mutate to a command line jockey, with a sense of linux witchcraft

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •