1
votes

I add, build the Cordova Windows App successfully using:

cordova platform add windows
cordova build windows -- --apx=8.1-phone --arch=x86

However, when I tried to run the windows app on the simulator:

cordova emulate windows -- --apx=8.2-phone --arch=x86

It always said:

Found package: C:\project\platforms\windows\AppPackages\CordovaApp.Windows_1.0.0.0_x86_debug_Test\CordovaApp.Windows_1.0.0.0_x86_debug.appx
Found certificate: C:\project\platforms\windows\AppPackages\CordovaApp.Windows_1.0.0.0_x86_debug_Test\CordovaApp.Windows_1.0.0.0_x86_debug.cer

Before installing this app, you need to do the following:
        - Install the signing certificate
Administrator credentials are required to continue.  Please accept the UAC prompt and provide your administrator password if asked.

There is no promt for me to type the password of Admin after that. There is nothing I can do except "Ctrl-C" to break.

I open the folder:

C:\project\....\CordovaApp.Windows_1.0.0.0_x86_debug.cer

I installed the certificate, and re-do all the above steps. Nothing changes.

Could you help?

  • For more information:
cordova requirements

Requirements check results for windows:
Windows OS: installed Windows 10
MSBuild Tools: installed 12.0
Visual Studio: installed 14.0
Windows SDK: installed 8.1
Windows Phone SDK: installed 8.1
2

2 Answers

2
votes

I found that the best way to debug a Windows app using Apache Cordova is to use Visual Studio debugger directly. So, just open Visual Studio, open your Windows Cordova project and run it on the device you need to test (current machine, simulator or device). It will works fine.

1
votes

As Odonno says it does work a bit more smoothly when you just use Visual Studio however I was able to get it working via ionic CLI by manually installing the certificate. The double click install of the cert reported success but didn't actually install the cert.

  1. Open the management console (or type 'certificate' on windows 10 to see it pop up)
  2. Naviagate to trusted root certificates
  3. Right click on the folder and click import
  4. Install the cert found in your app/platforms/windows/apppackages/xyz/ folder

Now you can successfully run the app via the ionic cli.