Running Your App on Device

In addition to running your app in the device simulator, you can also test its look, feel, and behavior on a real device. This provides more accurate test results. You can choose between loading your code and resources in the companion apps and building and deploying an application package on device.

Telerik Platform provides two mobile utilities which speed up the testing of your work in progress. The Telerik Platform companion app is a management utility which has a built-in QR code scanner and lets you view logs from your apps. The Cordova developer app is a testing utility for Apache Cordova-based app which lets you quickly load your code and resources on the device without actually building them as an app. For more information about the companion apps, see AppBuilder Documentation: The Companion Apps.

Application packages are real apps packaged as a native APK, IPA, or XAP file.

This article contains the following information:

Comparison Between Testing in the Developer App and Testing with Application Packages

The following table provides a brief comparison between testing in the developer app and testing with an application package.

Testing in the Developer App Testing an Application Package
Might produce inaccurate test results.
The Cordova developer app is a container in which you can load your code and resources. It has a number of limitations which might affect the accuracy of your testing. For more information, see AppBuilder Documentation: Limitations of the Developer Apps.
Produces the most accurate test results.
Application packages are real apps packaged as a native APK, IPA, or XAP file which is ready to be installed on a mobile device. When you test an application package, you are trying out the actual look, feel, and behavior that your users will experience when they install your app on their devices.
Does not require code signing.
After you have installed the Telerik Platform companion app and the Cordova developer app on your device, you can immediately begin testing in the developer apps.
Requires code signing.
Before you can build an application package, you might need to configure code signing for it. Based on your target mobile platform, this might require that you perform several operations in AppBuilder. For more information, see AppBuilder Documentation: Code Signing Your Hybrid App.
If you want to build for Windows Phone, you will also need to install the Telerik Application Enrollment Token on your device.
Faster build times.
When you issue a build for the Cordova developer app, Telerik Platform actually provides you with a QR code containing a link to the cloud copy of your app in a specific format. The operation is almost immediate because a native build does not occur.
Slower build times.
When you issue a build of an application package, Telerik Platform begins to perform a native build of your code and resources. The operation involves several time-consuming steps. You need to wait for the build to complete before you can deploy the application package on device.
Debugging is not available.
You cannot debug code and resources loaded in the developer app. However, you can view the app logs in the Telerik Platform companion app. For more information, see AppBuilder Documentation: View Logs.
Debugging is available.
If your application package meets the requirements, you can use the AppBuilder extension for Visual Studio to debug your code and resources while running them on device. For more information, see AppBuilder Documentation: Debugging on Device.

Load Code and Resources in the Developer App

  1. Verify that you have installed the Telerik Platform companion app and the Cordova developer app on your device.
  2. In the top menu bar of the Views service, select Run on device.
  3. Select your target mobile platform and select Cordova developer app.
  4. Select a build configuration, and click Next.
    For more information about working with build configurations, see Build Configurations.
    Option Description
    Debug
    • Adds the plugins that you have enabled for this configuration and sets their plugin variables with the correct values.
    • Includes any *.debug.* files in your application package, removes the debug modifiers from the file names and renames them to *.*.
    Release
    • Adds the plugins that you have enabled for this configuration and sets their plugin variables with the correct values.
    • Includes any *.release.* files in your application package, removes the release modifiers from the file names and renames them to *.*.
  5. For iOS and Android devices, complete the following steps to deploy from QR code.
    1. On the device, run the Telerik Platform companion app.
    2. Tap QR Scanner.
    3. Scan the QR code that AppBuilder shows.
  6. For Windows Phone devices, complete the following steps to deploy from QR code.
    1. On the device, run the Cordova developer app.
    2. With two fingers, tap and swipe the left edge of the screen to the right to toggle the sidebar menu.
    3. Tap QR Scanner.
    4. Scan the QR code that AppBuilder shows.
  7. Wait for the download to complete.
    On the device, the app loads in the Cordova developer app.

Run an Application Package on Device

  1. If you want to build for iOS, verify that you have configured code signing for your app.
  2. If you want to build for Windows Phone, verify that you have installed the Telerik Application Enrollment Token (AET) on your device.
    If the Telerik AET is not installed on the device, you can install it from the QR code provided during the build process.
  3. In the top menu bar of the Views service, select Run on device.
  4. Select a target platform and select App Package.
  5. (Optional) Select the build configuration that you want to apply.
    For more information about working with build configurations, see AppBuilder Documentation: Build Configurations.
    Option Description
    Debug
    • Adds the plugins that you have enabled for this configuration and sets their plugin variables with the correct values.
    • Includes any *.debug.* files in your application package, removes the debug modifiers from the file names and renames them to *.*.
    • If applicable to the AppBuilder client, applies any additional exclude or include rules defined in .debug.abignore.
    • Enables LiveSync. Users can receive the latest changes to your app by tapping and holding with three fingers on their device screens. LiveSync might not be available for some changes and users might need to reinstall the updated and rebuilt package.
      Enabling LiveSync enables the INTERNET Android permission.
      When LiveSync is enabled, you can use the LiveSync JavaScript API to work with LiveSync programmatically.
    • Enables debugging for the app, if applicable to the selected mobile platform.
    Release
    • Adds the plugins that you have enabled for this configuration and sets their plugin variables with the correct values.
    • Includes any *.release.* files in your application package, removes the release modifiers from the file names and renames them to *.*.
    • If applicable to the AppBuilder client, applies any additional exclude or include rules defined in .release.abignore.
    • Disables LiveSync. Users cannot receive the latest changes to your app by tapping and holding with three fingers on their device screens and users need to reinstall the updated and rebuilt package.
      Disables the INTERNET Android permission, if you have not manually enabled it. This might cause your app to stop working as expected.
    • Disables debugging for the app, if applicable to the selected mobile platform.
  6. Click Next.
  7. If you have selected to build an application package for iOS, select the provisioning profile and certificate that you want to use for code signing your app and click Next.
    AppBuilder lists provisioning profiles for development and Ad Hoc distribution only.
  8. After the build completes, deploy the app.

    • On a physical device, use a QR code scanner to scan the QR code and install the application.

      TIP: You can use the QR scanner of the Telerik Platform companion app.

    • Click Download to download the app package. Install the downloaded package manually on a physical device.

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.