Run Your NativeScript Apps on Devices

Filter by IDE
Select the Progress AppBuilder client you are currently using for development.

IDE

You can run your app as an application package on physical devices before publishing it. Running your app as an application package on a physical device provides the most accurate test results.

You can build and deploy an application package via QR code or via cable connection.

Prerequisites

AppBuilder Prerequisites

  • Verify that your preferred AppBuilder client is running and you are logged in.
  • Verify that you have opened the code for your app in AppBuilder.

iOS Prerequisites

  • If you want to build and run your app on an iOS device, verify that you have configured your code signing identities.
    For more information, see Code Signing of iOS Apps.
  • If you want to build and run your app on an iOS device via cable connection, verify that you have connected the device to your system and that AppBuilder recognizes it.
    For more information, see Connecting iOS Devices.
  • * Verify that the iOS device that you want to use runs on an iOS version equal or greater than the current deployment target.
    For more information about deployment targets, see iOS Properties.

Android Prerequisites

  • If you want to build and run your app on an Android device via cable connection, verify that you have connected the device to your system and that AppBuilder recognizes it.
    For more information, see Connecting Android Devices.

Procedure

In-Browser

Run Apps Over the Air

You can deploy your app on physical devices from a QR code.

AppBuilder produces the QR codes and the download URLs to your built content per build. Your shared QR codes or URLs provide access to a particular build and have a limited life.

  1. In the top menu bar, click RunBuild.
  2. Select a target platform and select App Package.
  3. (Optional) Select the build configuration that you want to apply.
    By default, Debug is selected.
    Option Description
    Debug
    • 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.
    Release
    • 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 .debug.abignore.
  4. Click Next.
  5. 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.
  6. 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.
      You can deploy your app from QR code, only if you selected to build an application package for Android or Windows Phone or an application package for iOS using an Ad Hoc provisioning profile.
    • Click Download to download the app package and install it manually on a physical device.
      You can download and install your app manually, if you selected to build an Android app, an iOS app with an Ad Hoc provisioning profile or an iOS app with an iOS development provisioning profile. You cannot download the application package, if you selected to build a Windows Phone app.
    • Click the URL above the QR code and press Ctrl+C to get the link for your app. On a physical device, use a browser to open the link and confirm the installation.
      You can download and install your app from the link, if you selected to build an application package for Android or Windows Phone or an application package for iOS using an Ad Hoc provisioning profile.

Windows

Run Apps Over the Air

You can deploy your app on physical devices from a QR code.

AppBuilder produces the QR codes and the download URLs to your built content per build. Your shared QR codes or URLs provide access to a particular build and have a limited life.

  1. In the top menu bar, click RunBuild.
  2. Select a target platform and select App Package.
  3. (Optional) Select the build configuration that you want to apply.
    By default, Debug is selected.
    Option Description
    Debug
    • 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.
    Release
    • 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 .debug.abignore.
  4. Click Next.
  5. 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 Build.
    AppBuilder lists provisioning profiles for development and Ad Hoc distribution only.
  6. 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.
      You can deploy your app from QR code, only if you selected to build an application package for Android or an application package for iOS using an Ad Hoc provisioning profile.
    • Click Download to download the app package and install it manually on a physical device.
      You can download and install your app manually, if you selected to build an Android app, an iOS app with an Ad Hoc provisioning profile or an iOS app with an iOS development provisioning profile.
    • Click Copy link to get the link for your app. On a physical device, use a browser to open the link and confirm the installation.
      You can download and install your app from the link, if you selected to build an application package for Android or an application package for iOS using an Ad Hoc provisioning profile.

Run Apps Over Cable

You can deploy your app on a physical device via cable connection.

  1. (Optional) Select a build configuration.
    1. In the Project Navigator, right-click your solution node and select Build Settings.
    2. From the drop-down list, select the build configuration option that you want to enable.
      Option Description
      Debug
      • 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.
      Release
      • 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 .debug.abignore.
    3. Click OK.
  2. Connect your devices to your system via USB cable.
  3. In the status bar, click Show Mobile Devices and verify that AppBuilder lists your connected devices.
  4. In the top menu bar, click RunBuild and Deploy.
    If you are attempting to re-deploy your app on one or more devices, the Build And Deploy dialog appears. You can choose on which devices to deploy the app.
    If AppBuilder cannot deploy on one or more devices because of configuration issues, the Build And Deploy dialog appears. You can choose whether to continue and deploy on enabled devices or to solve the configuration issues.
  5. Wait for the build and deployment process to complete.
    AppBuilder notifies you when the operation is complete.
  6. (Optional) Click the notification for more details.
    In the status bar, the Log pane opens.
  7. On the connected devices, if the app does not launch automatically, tap the app icon to run it.

Visual Studio

Run Apps Over the Air

You can deploy your app on physical devices from a QR code.

AppBuilder produces the QR codes and the download URLs to your built content per build. Your shared QR codes or URLs provide access to a particular build and have a limited life.

  1. In the top menu bar, click AppBuilderBuild <app_name> in Cloud.
  2. Select a target platform and select App Package.
  3. Select build configuration.
    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 *.*.
  4. (Android only) Select CPU architecture.

    Option Description Additional Comments
    armV7 Supported Instruction Sets:
    • armeabi
    • Thumb-2
    • VFPv3-D16
    • Other, optional
    This architecture is used by most of the devices and ARM native emulators. ARM emulators are significantly slower than x86 emulators.
    x86 Supported Instruction Sets:
    • x86 (IA-32)
    • MMX
    • SSE/2/3
    • SSSE3
    This architecture is used by most of the native emulators, all GenyMotion emulators and some devices.
    Both This option produces a combination of APK files built against the armV7 and x86 CPU architectures.
    Supported Instruction Sets:
    • armeabi
    • Thumb-2
    • VFPv3-D16
    • Other, optional
    • x86 (IA-32)
    • MMX
    • SSE/2/3
    • SSSE3
    None
  5. Click Next.
  6. If you have selected to build an application package for iOS, from the Provision drop-down menu, select the provisioning profile that you want to use for code signing your app and click Build.
    AppBuilder lists provisioning profiles for iOS development and Ad Hoc distribution only.
  7. Deploy the app.
    • On a physical device, use a QR code scanner to scan the QR code and install the application.
      You can deploy your app from QR code, only if you selected to build an application package for Android or an application package for iOS using an Ad Hoc provisioning profile.
    • Click Download to download the app package and install it manually on a physical device.
      You can download and install your app manually, if you selected to build an Android app, an iOS app with an Ad Hoc provisioning profile or an iOS app with an iOS development provisioning profile.
      When you click Download, Windows Explorer opens the folder where the application package is stored on your disk during the build process.
    • Click Copy link to get the link for your app. On a physical device, use a browser to open the link and confirm the installation.
      You can download and install your app from the link, if you selected to build an application package for Android or an application package for iOS using an Ad Hoc provisioning profile.

Run Apps Over Cable

You can deploy your app on a physical device via cable connection.

When you build for a connected iOS device, the extension for Visual Studio attempts to build your app with an applicable pair of provisioning profile and cryptographic identity for iOS development.

  1. (Optional) To enable or disable LiveSync, from the Solution configurations drop-down menu in the standard toolbar, select the build configuration option that you want to enable.
    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.
  2. Connect your devices to your system via USB cable.
  3. In the top menu bar, click AppBuilderDevices List and verify that AppBuilder lists your connected devices.
  4. In the top menu bar, click AppBuilderBuild <app_name> and Deploy.

    • If you are attempting to re-deploy your app on one or more devices, the Build And Deploy dialog appears. You can choose on which devices to deploy the app.
    • If AppBuilder cannot deploy on one or more devices because of configuration issues, the Build And Deploy dialog appears. You can choose whether to continue and deploy on enabled devices or to solve the configuration issues.

      Android CPU architectures are detected by AppBuilder and selected automatically when running apps on connected devices.

  5. Wait for the build and deployment process to complete.
  6. On the connected devices, if the app does not launch automatically, tap the app icon to run it.

CLI

Run Apps Over the Air

You can deploy your app on physical devices from a QR code.

AppBuilder produces the QR codes and the download URLs to your built content per build. Your shared QR codes or URLs provide access to a particular build and have a limited life.

  1. In the command prompt, navigate to the directory that contains your app.
  2. Run the following command.

    appbuilder build <platform>
    

    You can set android or ios as the target platform.
    When you build for iOS, you might need to specify the --provision and --certificate parameters.

    • (Optional) To download the application package after the build completes, run the following command.
      This operation also downloads the final manifest file for the application package.

      appbuilder build <platform> --download
      
  1. Wait for the build to complete.
    After the build completes, AppBuilder opens a new window in the browser and shows the QR code for installing your app.
  2. Deploy the app.
    • On a physical device, use a QR code scanner to scan the QR code and install the application.
      You can deploy your app from QR code, only if you selected to build an application package for Android or an application package for iOS using an Ad Hoc provisioning profile.
    • If you have set the --download switch, AppBuilder automatically downloads the application package on your system and prints the download location.

Run Apps Over Cable

You can deploy your app on a physical device via cable connection.

When you build for a connected iOS device, the command-line interface attempts to build your app with an applicable pair of provisioning profile and cryptographic identity for iOS development.

  1. Connect your devices to your system via USB cable.
  2. In the command prompt, navigate to the directory that contains your app.
  3. Run the following command to verify that the command-line interface recognizes your connected devices.

    appbuilder device
    
  4. Run the following command.

    appbuilder deploy <platform>
    

    You can set android or ios as the target platform.
    When you build for iOS, you might need to specify the --provision and --certificate parameters.

    • (Optional) To deploy only to a selected device, run the following command.

      appbuilder deploy --device <index or serial number>
      
  5. Wait for the build and deployment process to complete.
  6. On the connected devices, if the app does not launch automatically, tap the app icon to run it.

Next Steps

Examine the NativeScript API documentation and continue with your native development.

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.