allemattio
allemattio

Reputation: 1848

Windows 10 icons in Cordova config.xml

I'm building my sencha touch app for windows 10 using cordova. For iOS and Android the cordova documentation explains very well how to configure the various icons and splashscreens. But for windows the example shows very few icons, I've tried to configure them as in the example, but when I open the windows 10 built solution with visual studio, I see that all the icons are the default cordova ones, not the ones that I've configured.

I've added in my config.xml these lines

<platform name="wp8">
    <splash src="../resources/splashscreen/wp8/SplashScreenImage.png" width="768" height="1280"/>
    <icon src="../resources/icons/wp8/ApplicationIcon.png" width="99" height="99" />
    <!-- tile image -->
    <icon src="../resources/icons/wp8/Background.png" width="159" height="159" />
</platform>

<platform name="windows8">
    <splash src="../resources/splashscreen/windows8/SplashScreenImage.png" width="620" height="300"/>

    <icon src="../resources/icons/windows8/logo.png" width="150" height="150" />
    <icon src="../resources/icons/windows8/smalllogo.png" width="30" height="30" />
    <icon src="../resources/icons/windows8/storelogo.png" width="50" height="50" />
</platform>

But in visual studio I see these icons, and all are taken from the cordova default icon, the one with the "droid":

App Icons

Is there a way to configure the Windows 10 Icons in the config.xml? In the cordova documentation I can't find anything about this.

Thanks in advance

Upvotes: 2

Views: 1446

Answers (1)

Vero
Vero

Reputation: 1750

You add this in config.xml for the Windows platform icons:

<platform name="windows">
    <icon src="res/windows/storelogo.png" target="StoreLogo" />
    <icon src="res/windows/smalllogo.png" target="Square30x30Logo" />
    <icon src="res/windows/Square44x44Logo.png" target="Square44x44Logo" />
    <icon src="res/windows/Square70x70Logo.png" target="Square70x70Logo" />
    <icon src="res/windows/Square71x71Logo.png" target="Square71x71Logo" />
    <icon src="res/windows/Square150x150Logo.png" target="Square150x150Logo" />
    <icon src="res/windows/Square310x310Logo.png" target="Square310x310Logo" />
    <icon src="res/windows/Wide310x150Logo.png" target="Wide310x150Logo" />
</platform>

You place your custom icons at res/windows folder.

When you build the app, it will use these icons.

Also note that in your code you used platform name="windows8" and it should be "windows".

Upvotes: 1

Related Questions