Windows 10 Universal Windows Platform Apps is a great framework to write applications for Windows platform. These apps can be deployed on a range of Windows devices, ranging from Desktop/Tablets to Phone and XBox.
Since Windows work on various type of devices with a range of form factors and capabilities, a common application model/framework is needed to help developer write one app and the app should adjust to different devices in Windows family. With the intent to write a common architecture, Windows 8 introduced Windows Runtime (WinRT) evolving over the Windows app model. This allowed developer to write application targeted to Windows and Windows Phone.
Windows 10 further evolved this to Universal Windows Platform (UWP). With Windows 10 unified code, UWP provides a common app platform on all devices running Windows 10. Thus the app can call WinRT API as well as Win32 and .NET APIs specific to the device family it is running on.
While I wrote a UWP app, I could test it on my Desktop and then deploy to my Windows Phone for field testing.
First, you need to generate an app package.
To generate an app-package, you can right click on the project, select Store > Create App Packages
In the wizard, pick “Yes” to build package to upload to Windows Store. Reserve a new name for the app and Create a package. Do not include PDB symbol files in package unless you plan to debug it on the device. Package will considerably grow in size with PDBs included.
This step is followed by a series of builds of all the architectures you picked – x86, x64, ARM. Have patience, wait for it to complete… The wizard, next, will allow you to run validation of package. You can choose to run it on a local machine.
Windows App Certification kit will show option to choose from a bunch of tests, select all and run. The app will be launched multiple times throughout the test and towards the end you will get the result.
Second, Setup Phone for App Deployment
Go to Settings > Updates & security > For developers
- Developer mode
- Device discovery
- Device Portal
Now you have a web access to your phone!
Third, Deploy Package
Open the IP in a web browser on your machine connected to same network. There’s certificate error that you can ignore. The form asks you for a pin which is available from your phone. On the developer settings page, click on “Pair” and you will get the pin.
Once you have authenticated, you will get an access to the App manager, the interface should be familiar to the IoT guys. Here, you browse to the App package [PhotoBooth\bin\ARM\Release\PhotoBooth_18.104.22.168_ARM.appx] and deploy.
Once deployment completes, you can launch the app on your phone!
The other option is to deploy from command line. There’s WinAppDeployCmd.exe in Windows 10 SDK.
WinAppDeployCmd install -file “PhotoBooth_22.214.171.124_ARM.appx” -ip 192.168.137.121 -pin A1B2C3