Introduction
Use Appcelerator Studio or CLI to deploy your Titanium projects as Windows Phone applications, which can be deployed to Windows Phone devices. To deploy to a Windows tablet, you need to package a Windows Store app with Studio or the CLI, configure the tablet to sideload a package, and install the public certificate and package.
Windows Phone
Before deploying the application to a Windows Phone device, you will need to:
- Set the Publisher ID in the CLI or Studio
- Register the device using the Windows Phone Developer Registration tool (part of the Windows Phone SDK)
- Connect the device to your computer with a USB cable
Set the publisher ID
Register the device
The following instructions are from Windows Dev Center: How to register your phone for development for Windows Phone.
-
Turn on your phone and unlock the phone screen.
-
On your phone, ensure that the date and time are correct.
-
Connect your phone to your computer by using the USB cable that came with your phone.
-
On your computer’s Start screen, switch to All apps view.
-
Under Windows Phone SDK 8.1, click Windows Phone Developer Registration.
-
Verify that the Status message displays Identified Windows Phone device. Click the Register button to unlock the phone. If your phone is already registered, the Status message indicates this and you see an Unregister button.
-
Click Register.
-
In the Sign In dialog box for your Microsoft account (formerly known as a Windows Live ID), enter the email address and password for your Microsoft account. Click Sign In. If you’re a registered developer, be sure to use the Microsoft account associated with your developer account.
-
After your phone is successfully registered, the Status message displays: "Congratulations! You have successfully unlocked your Windows Phone."
Your phone is now registered. You can now deploy apps to the phone.
Deploy to a device with Studio
To deploy with Studio:
- Select the project in the Project Explorer view.
- In the global tool bar, select Run from the Launch Mode drop-down list.
- Select Windows Phone Device from the Target drop-down list.
- If the Launch Automatically option is enabled under the Target drop-down list, the application will be automatically launched after the device is selected. If not, you need to click the Launch button to start the build process.
Your app will be built, installed to your device and automatically launched.
Deploy to a device with the CLI
To deploy an application to a device with the CLI, run the following command:
appc run -p windows -T wp-device |
Windows tablet
To deploy to a Windows tablet, you need to sideload the application package to the device.
- Package the application as a Windows Store app. For instructions, see Distributing Windows Applications.
- Enable the Allow all trusted apps to install group policy
- Install the public certificate that was used to sign the package to the tablet's Trusted Root Certification Authorities store
- Execute a PowerShell command to install the package to the tablet with
the
Add-AppDevPackage
PowerShell script.
After you package the application, copy the project's generated.cer
and ./dist/<PACKAGE_NAME>_Win32.appx
files to to a USB drive and plug it into the tablet.
Edit group policy settings
To enable installation of the package, you need to update the device's group policy.
- Go to the Start screen and type "edit group policy."
- Click Edit Group Policy.
- Expand Computer Configuration \ Administrative Templates \ Windows Components
- Click App Package Deployment.
- Double-click Allow all trusted apps to install.
- Click Enabled.
- Click OK.
Install the certificate
Install the certificate you copied to the USB drive to the device's Trusted Root Certification Authorities store. You will need administrative privileges.
- Double-click the certificate file.
- Click Install Certificate... to open the Certificate Import wizard.
- Click LOCAL MACHINE, then click Next.
- Click Place all certificates in the following store, click Browse, click Trusted Root Certification Authorities, click OK, then click Next.
- Click Finish.
A dialog should appear that the certificate was installed successfully.
Install the package
Open PowerShell and execute the Add-AppDevPackage
command to install the application.
- Go to the Start screen and type
powershell
. - Click PowerShell.
-
Execute the following command to install the package:
<TITANIUM_PROJECT_DIR>\build\windows\win10.x86\AppPackages\ProjectFolder\<PACKAGE_NAME>\Add
-AppDevPackage
.ps1
The application will be installed to the device and you can access it from the All apps screen.