Deploy your app

Apps built with ArcGIS Runtime SDK for Qt are self-contained. For example, deploying a Windows app does not add keys to the Windows registry. Deploying apps can be as simple as copying and pasting your app's executable files along with other dependent files to a different machine or device. Likewise, uninstalling can be as simple as deleting the files. The SDK lets you build and deploy self-contained, stand-alone apps or build and deploy capabilities into existing software.

Follow the steps below to ensure you've licensed the capabilities that your app uses and that you understand associated costs.

  1. License the capabilities you included in the app. License your app describes license levels and costs associated with deployment.
  2. Attribute Esri in your app. For details, see the attribution section in License your app.
  3. Prepare your app:
    • For Android, compile your app, and then use the androiddeployqt deployment tool provided by the Qt Company to create an .apk. If publishing to the Google Play store, consult the Android documentation for a checklist of items to review before publishing.
    • For iOS, build your Qt project, open the output .xcodeproj file in Xcode, and create an .ipa by archiving your app. Note that apps can be distributed either through an in-house enterprise program or by submitting your app to the App Store.
    • For macOS, compile your app, and use the Mac deployment tool provided by the Qt Company. This tool bundles the dependencies into an application bundle. Details about using Qt's Mac deployment tool are found later in this topic.
    • For Linux, compile your app. Place the executable (.exe) and any associated resources such as packages, data, or client files, inside a folder you intend to use as a deployment folder. You can get details from the article Linux deployment on the Qt Company's website.
    • For Windows, build your Qt project. , and use the Windows deployment tool provided by the Qt company. This tool creates a deployable folder containing all the dependencies needed to run the app.
  4. Your output app distribution has a format suitable for the target platform:
    • Android: An Android app package (.apk).
    • iOS: An iOS app archive (.ipa) file.
    • Linux: a deployment folder containing an executable and one or more .so files.
    • OS X: An OS X app bundle (.app) and one or more .dylib files.
    • Windows: a deployment folder containing an .exe and one or more .dll files.
  5. Test the app by copying it to a desired location on your desktop or device, and running it. For Windows, Linux, and OS X, use the file browsers on the respective platform. For Android, use the command line Android Debug Bridge (adb) tools that come with the Android SDK or third party file transfer software. For an iOS .ipa file,copy to a provisioned device through iTunes.
  6. Caution:

    For ArcGIS Runtime SDK deployments to Linux, it is particularly important that an app is not tested by running it from the deployment folder, as the SDK creates files that are specific to the current machine and user. To test a Linux deployment, make a copy of the deployment folder, test using one copy, and deploy the other clean copy. Similarly, deployments to Linux should only be run from a USB if they are not intended to be deployed to a different machine.

Using Qt's Mac deployment tool

To deploy an OS X app on the Mac, you must create an OS X app bundle (a bundle) containing the executable and all of its dependencies. The Qt Company made this process easier for Qt developers by providing the Mac Deployment Tool. While assembling the bundle, the tool modifies all of the dependencies in the bundle to reference the libraries inside the bundle rather than the libraries on the machine where your app was originally built.

Before using the Mac Deployment Tool with the ArcGIS Runtime SDK for Qt libraries, you must create various symbolic links. The links tell the Mac Deployment Tool where to find required ArcGIS Runtime dependencies. At minimum, create a symbolic link to libEsriRuntimeQt.dylib in /usr/lib. Usually you need symbolic links to libqcocoa.dylib and libcocoaprintersupport.dylib, too.

ln -s $HOME/ArcGIS/<version>/sdk/OSX/x64/lib/libEsriRuntimeQt.dylib /usr/lib/libEsriRuntimeQt.dylib

ln -s $HOME/<QtHome>/clang_64/plugins/platforms/libqcocoa.dylib /usr/plugins/platforms/libqcocoa.dylib

ln -s $HOME/<QtHome>/clang_64/plugins/printsupport/libcocoaprintersupport.dylib /usr/plugins/printsupport/libcocoaprintersupport.dylib

Note:
If later you begin using different versions of Qt or the ArcGIS Runtime SDK for Qt, you must recreate these symbolic links.

After you create the symbolic links, run the Mac Deployment Tool. Specify the path to the OS X app bundle and, using the optional qmldir parameter, specify the path to the folder containing your app's QML source files. This ensures that the tool scans the import statements in the QML source files for any additional dependencies.

cd $HOME/pathToApplication

$HOME/<QtHome>/clang_64/bin/macdeployqt SampleProject.app -qmldir=../../SampleProject/qml

Related topics