Customizing Your Windows 10 Mobile Application (Magic xpa 3.x)
To compile the code you need to install:
Windows 10 operating system.
Visual Studio 2015 with the Universal Windows App Development Tools. Refer to the Download or Update Visual Studio section at: https://msdn.microsoft.com/en-us/windows/uwp/get-started/get-set-up.
SQLite for Universal Windows Platform version 3.13.0. To install it, run the sqlite-uwp-3130000.vsix file from the %EngineDir%\RIAModules\Windows10Mobile folder.
You can customize the application and compile it automatically using Magic xpa’s Rich Client Deployment Builder or you can do it manually as described below.
The source code for the Windows 10 Mobile application is located at: %EngineDir%\RIAModules\Windows10Mobile\Source.
You can change the characteristics of the application in the settings.properties file as follows:
package.displayname – The application title as visible to the user.
package.name – The identifier of the project. The package name must be unique across all packages installed on the system.
publisher.displayname – The name of your company.
version – A string value that represents the release version of the application code, as it should be shown to users.
output.dir – The folder that will contain the built installers.
You can change the following files as well:
Icons and startup logo – Replace the icons and startup logo files in the MagicApp\Assets folder. Make sure that a customized image has the same name and resolution as the original image.
Execution properties – Open the execution.properties file and change the execution values.
You need to define either the execution properties’ values or a URL referring to a file containing the execution properties’ values as defined above. Leaving the URL property empty means that a dialog box will be opened and the end user will need to write the URL. This is useful when having a generic application where different customers can log in to different servers. After specifying the URL in the dialog box, you cannot change the URL value. The only thing you can do is re-install the app.
Resources, such as images, can be packaged as part of the application. Refer to: Packaging Resource Files.
After performing the desired changes, you need to compile the application and sign it. A test certificate is provided in the installation and used by default, so for testing purposes you can use this certificate. For deployment it is recommended to create your own certificate.
The compilation of the Windows 10 Mobile project is done using the MSBuild tool.
Navigate to the application source folder: %EngineDir%\RIAModules\Windows10Mobile\Source.
Run the following file: build.cmd.
The build process creates an appx file named myapp.appx inside the project’s %EngineDir%\RIAModules\Windows10Mobile\Source\Output directory.
That’s it; you can now take the application file and install your application on your mobile device as detailed at Installing an Application on a Mobile Device or Simulator.
If you want to upload your application to the store, you first need to configure and create an application package. This is best done from Visual Studio.
After running the build.cmd, the output folder also contains the customized source of the application. Open the application using Visual Studio and follow the steps defined at: https://msdn.microsoft.com/en-us/windows/uwp/packaging/packaging-uwp-apps to create the application package and upload it to the store.
By default, the Windows 10 Mobile application requires permissions for different actions, such as sending a text message and making phone calls. These permissions are defined by default since these capabilities are provided by the built-in Magic xpa functionality. You can, however, disable them by opening the Package.appxmanifest file (located at RIAModules\Windows10Mobile\Source\MagicApp) using a text editor and change the Capabilities lines.
Refer to https://msdn.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations for further information.