Friday, March 18, 2016

Windows Cordova App (Universal 10 Phone & 8.1 Phone) Building and Packaging Issue

Leave a Comment

I have an issue with packaging a Cordova Windows app targeting Windows Phone 10 Universal Phone and Windows Phone 8.1.

My app is developed in JS & HTML targeting iOS, Android and Windows with Cordova. When building & packaging on Windows I have the following issues:

  1. I could not create a bundle which would be recognized as supporting multiple languages by the windows store. I had the following resource token in the appxmanifest: <Resource Language="x-generate"> but then it would only detect my default language which I set to de-CH. I then replaced this token with the actual language tokens: <Resource Language="de-CH"><Resource Language="fr-CH">.... When building, VS2015 would complain that there are no resources for the default language and I had the same Issue as before, the app would only be recognized as supporting 1 language. After googling around a bit and taking a look at the Localization Example I added the following to my CordovaApp.Windows.jsproj (WinPhone10) and CordovaApp.Phone.jsproj (WinPhone8.1) File:

    <ItemGroup>   <Content Include="strings\de-CH\resources.json" />   <Content Include="strings\fr-CH\resources.json" />   <Content Include="strings\it-CH\resources.json" />   <Content Include="strings\en-US\resources.json" /> </ItemGroup> 

    and

    <ItemGroup>   <PRIResource Include="strings\de-CH\resources.resjson" />   <Content Include="strings\de-CH\resources.json" />   ...[These two lines repeated for every other language]... </ItemGroup> 

    I of course also created this folder structure (strings\de-CH\..., etc.) in my project. The .json and .resjson files only contain the following content: {} as I do not use the native localization features. This did actually work and the store correctly identified the app as being multilingual. BUT it started building _language-fr.appx, etc. binaries and added them to the bundle. The problem with this is that I only target the arm architecture as one of the plugins I use needs to be built against specific architectures and does not support the neutral target. But strangely the Windows Phone 10 Universal bundle now contains the _language-x.appx files compiled as neutral: Bundle contents on the Windows Store show neutral appx This breaks the display of the Supported processors section on the Windows Store as this now lists neutral, arm or x86, x64, arm depending on which platform you look at it. What can I do to fix this? I need the store to recognize the different languages but without building against neutral.

  2. My second issue is in regard to the Supported operating systems section in the Windows Store. Here I have the issue that it shows:

    Windows Phone 10 Windows Phone 8.1 Windows Phone 8 

    And for a while it also showed Windows Phone 7 which mysteriously disappeared... But I still only target the first two. As you can see from the screenshot above, the store recognized the Windows Phone 8.1 build correctly and I only uploaded the two visible builds. I do not want to target Windows Phone 8. For the Windows Phone 10 appxmanifest I have the following entry:

    <Dependencies>   <TargetDeviceFamily MaxVersionTested="10.0.10586.29" MinVersion="10.0.10586.0" /> </Dependencies> 

    Which was mostly default, I only adjusted the MaxVersionTested and added the Name="Windows.Mobile" (I did not yet build & submit with the Name property set like this), just to be on the safe side. In the Windows Phone 8.1 appxmanifest I've had the following entry:

    <Prerequisites>   <OSMinVersion>6.3.1</OSMinVersion>   <OSMaxVersionTested>6.3.1</OSMaxVersionTested> </Prerequisites> 

    I checked the Version codes for Windows Phone 8.1 and they look very different. These versions look like normal Windows 8.1 version codes. The Windows Phone 8.1 version codes are longer but the properties in the appxmanifest only allow versions with 3 places. Would it help or even work if I changed it to the following:

    <Prerequisites>   <OSMinVersion>8.10.14147</OSMinVersion>   <OSMaxVersionTested>8.10.15148</OSMaxVersionTested> </Prerequisites> 

Just to be clear, the appxmanifests of the project are:

package.phone.appxmanifest for Windows Phone 8.1 package.windows10.appxmanifest for Windows Phone 10 Universal 

It would be great if someone could help me with these two issues. Thanks a lot in advance!

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment