cordovawindows-store-appsvisual-studio-cordovavisual-studio-2015taco

Cordova app packaging for Windows Universal APP which works on both mobiles and surfaces


I want to submit an app which works on Windows Mobile 8.1, Windows Mobile 10 and Windows Surface (with OS windows 8.1 and Windows 10). I have used Visual Studio Community Tools For Apache Cordova Update 9 for packagin. When I packaged the app by selecting Windows-Any CPU From Platform and package CordovaApp.Windows_1.1.0.1_x86_x64_arm_bundle.appxupload package file successfully submition of the app to the store its only working on Surfaces(windows 8.1 and windows 10) but not downloadable on Mobile devices.


Solution

  • It cannot be achieved by one package if you want it works for both windows 8.1 desktop and mobile.

    When you selecting Windows-Any from platform and target OS Windows 8.1 (default value in visual studio 2015, check the setting under Windows tab in config.xml designer), it means you are generating a windows 8.1 store app. It can works on Windows 8.1 and Windows 10 but not on mobile device.

    If we change the target OS to Windows 10, the app will works on both windows 10 desktop(like surface) or mobile device.

    To make the app works on both windows 8.1 or 10 mobile device, we need to change the platform to Windows Phone (Universal). Create the package for windows phone device and submit this package as well.

    When we go into the platforms\windows folder in our project folder, we will see there are 4 jsproj files:

    CordovaApp.Phone.jsproj is for windows phone 8.1 app.

    CordovaApp.Windows.jsproj is for windows 8.1 app.

    CordovaApp.Windows10.jsproj is for windows 10 app (works on both desktop and mobile device)

    CordovaApp.Windows80.jsproj is for windows 8.0 app.