Visual Studio 2015 Cordova Windows 10 > Blank/white screen after associated with the existing windows store app

前端 未结 4 800
星月不相逢
星月不相逢 2020-12-06 13:16

Without associating the app with the store, i can run and debug the cordova app on my devices (all works fine). But after associating the app with the store (or after built

相关标签:
4条回答
  • 2020-12-06 13:57

    before associate app in visual studio

    ionic plarform add windows

    cordova build -- --packageCertificateKeyFile="CordovaApp.Windows10_StoreKey.pfx" --packageThumbprint="8d66824...."

    and you have associated app without visual studio

    0 讨论(0)
  • 2020-12-06 14:11

    I ran into the same issue.
    In fact, when we associate app with the store, association change "Package Name" with name generated to the store.
    The result is : start page don't know where is "index.html" because package name changed.

    To resolve it, cordova team added two preferences :

    <preference name="WindowsStoreIdentityName" value="12225TOTO42.3355241V9C2T6" />
    <preference name="WindowsStorePublisherName" value="CN=9985D2C8-IUI5-4272-TOTO-EBR6FE26877A" />
    

    You just have to add it to your config.xml and fill fields with your app identity informations (retrieve this values from App Management --> App Identity in the Dev Center)

    Association should be successful now !

    The issue reference is here : https://github.com/phonegap/build/issues/506

    0 讨论(0)
  • 2020-12-06 14:12

    i found a solution!

    The error only occur, when i install cordova and plugins over CLI, but when i start a cordova project over visual studio 2015 and use the integrated plugin manager -> so it works without any error.

    Kevin

    0 讨论(0)
  • 2020-12-06 14:13

    I had the same problem but I resolve it now. When you associate the application to store, Visual Studio changes these values:

    but it does not change the value of package name in the application tab:

    so the index.html is not found and the app shows a blank screen. To resolve it, you must add two preferences in config.xml file as described here:

    https://stackoverflow.com/a/40658027/2496666

    and rebuild the project from CLI with the usual command:

    cordova build windows
    

    after rebuild the project, the values shown in the following image must be the same:

    0 讨论(0)
提交回复
热议问题