-
Notifications
You must be signed in to change notification settings - Fork 417
Working with UWP
UWP Apps may distributed in 2 different ways:
-
In the Windows App Store. (This should be used for deployment of any production app).
-
Outside of the Windows App Store via sideloading directly onto a device. This should only be used for development.
UWP apps may be deployed directly to Windows 10 desktop and mobile devices without any need to involve the Windows Store. This process is only realistic, though, for testing and debugging your app during development because it requires you to enable "Development" mode on the device. In addition, installation is a little bit more complicated than simply downloading an app over the internet. The process for deploying to Windows 10 desktop devices is different than the process for mobile devices. These are described in the following sections.
Before you can side-load apps onto your phone, you’ll need to set up your phone for development.
-
In "Settings", select "Update & Security" > "For developers"
-
Select "Developer mode"
-
Under "Device Discovery", make sure that the "Make your device visible to USB connections and your local network" is set to "On".
-
Make sure that "Device Portal" is set to "On"
-
When you switch "Device Portal" to "On" it should show you an address that you can access the Phone at via wifi. (E.g. https://10.0.1.11). Remember this address, you’re going to use it to install all of your apps onto the device.
NoteThis will be a local address within your local network. It won’t be available to the outside world.
At this point, your phone should be ready to receive "Side-loaded" apps. This was a one-time setup, so you shouldn’t have to do it again, until you set up another device.
Now that your device is set up for development, you can proceed to build your app.
-
Select the "Debug Mobile" option in the UWP Codename One Settings.
-
Select the "Send Windows UWP Build" option in the Codename One menu of your IDE. This will initiate the build on the Codename One build server.
-
Log into the Codename One dashboard to watch the build progress. When it is complete, you’ll be able to download the ".appxbundle" file to your desktop.
WarningYou cannot simply download the .appxbundle file directly to your Windows Phone 10 mobile device and install it. It will indeed allow you to download it, and will give you an option to install it, but the install will silently fail.
-
Point your computer’s web browser to the address for your mobile device. (This is the address listed when you turned on the "Device Portal" in the "Enabling Developer Mode on Device" section above. This will open the App Manager page.
-
Click on the "Apps" item in the left menu.
-
Under the "Install App" section, click the "Choose File" button and navigate through the file chooser to select the .appxbundle file for your app. If this is the first time installing an app on your device, you may also need to provide the dependencies. (You can find the dependencies for mobile/ARM apps here. You’ll need to provide both
Microsoft.NET.CoreRuntime.1.0.appx
andMicrosoft.VCLibs.ARM.Debug.14.00.appx
). Click the "Add Dependency" button, and use the file chooser to select both of the .appx dependencies. Again, The dependencies will only be required the first time you install an app this way -
Once you have the appxbundle and its dependencies selected, you should press "Go" under the "Deploy" subheading. This will install the app and, if all went well, your app will appear in the "Recently Added" section in the apps list of the phone.
About This Guide
Introduction
Basics: Themes, Styles, Components & Layouts
Theme Basics
Advanced Theming
Working With The GUI Builder
The Components Of Codename One
Using ComponentSelector
Animations & Transitions
The EDT - Event Dispatch Thread
Monetization
Graphics, Drawing, Images & Fonts
Events
File-System,-Storage,-Network-&-Parsing
Miscellaneous Features
Performance, Size & Debugging
Advanced Topics/Under The Hood
Signing, Certificates & Provisioning
Appendix: Working With iOS
Appendix: Working with Mac OS X
Appendix: Working With Javascript
Appendix: Working With UWP
Security
cn1libs
Appendix: Casual Game Programming