0
votes

I am trying to run cordova app on windows 10 iot core.

  • hardware info: Raspberry Pi 3B.
  • cordova version: 7.0.1
  • cordova-windows version: 5.0.0
  • build command: cordova build windows --debug --arch=arm -- --appx=uap
  • config.xml:
    • <preference name="windows-target-version" value="10.0" />
    • <preference name="WindowsDefaultUriPrefix" value="ms-appx://" />

I use cordova cli to create a new project, which default includes index files, use platform to add windows, and set to arm arch and uap on build. Next, I use device portal to install the appx and cer files that cli generated, then start the app from apps list in dev portal.

The app's status will be running, but the index.html doesn't shown up, unless I remark the cordova.js in index.html. If I reference the cordova.js, the splash screen will keep loading; if I remove the cordova.js, the index.html will show up. In that case, I will not be able to communicate with cordova native code from javascript, it should not be right.

Question is, if I want to develop an headed cordova-based uap app running on windows 10 IoT Core, what am I missing?

NOTE: if I use vs2015 to build the same project for x64 platform, I can install and run the uwp app on my win 10 x64 notebook without any problem.

1

1 Answers

0
votes

unless I remark the cordova.js in index.html. In that case, I will not be able to communicate with native code, it's not right

I'm afraid I don't know what you mean by this statement.

Running apps from Windows 10 on a Windows 10 Iot Core may not work due to Windows api's not being available for use in the Iot Core edition.

  1. You would need to unzip the files in the appx file that you produced on your desktop
  2. Then download and run the IotAPICorePortingTool on each file you extracted from the appx
  3. The output of the IotAPICorePortingTool will tell you which API's are needed by your cordova app, but missing on Windows IOT