Install and set up on macOS

Start here to set up your development environment with ArcGIS Runtime SDK for Qt. You can have multiple versions of this SDK existing on the same machine. You can also have ArcGIS Runtime SDK for Qt on the same machine as other ArcGIS Runtime SDKs.

Note:

No license is required to develop ArcGIS Runtime apps; there's no need to authorize your development machine. As a member of the ArcGIS Developer Program, you have a free ArcGIS Developer Subscription (Essentials Plan). With this plan you can download and install any ArcGIS Runtime SDK and immediately have access to all the functionality of the APIs for development purposes. You can become a member of the developer program for free.

This topic describes how to set up the following:

  • ArcGIS Runtime SDK for Qt for macOS.
  • The Qt Framework for macOS—This framework is available from The Qt Company for developing cross-platform applications. This is not an Esri product.
  • The Qt Framework for Android—This framework is available from The Qt Company for developing Android applications. This is not an Esri product.
  • The Qt Framework for iOS—This framework is available from The Qt Company for developing iOS applications. This is not an Esri product.
  • Qt Creator—The IDE for Qt application development available from The Qt Company. This is not an Esri product.

See ArcGIS Runtime SDK for Qt System Requirements for detailed software requirements.

Install Xcode

Install Xcode and the Xcode command line tools from https://developer.apple.com/downloads/index.action. You will need a developer account to log in. Follow the documentation at Apple's Web site.

Download the Qt Framework for macOS

To build an application using the ArcGIS Runtime SDK for Qt, you need the Qt Framework designed to work with your compiler. You can install Qt Frameworks for multiple target platforms on your development machine, side-by-side.

  1. Download and install the Qt Framework for macOS from The Qt Company. Be sure to install Qt Creator along with the Qt Framework.
  2. Open SSL support is required. Open SSL allows access to secure services that need user credentials. It is not delivered with the Qt Framework. For more information, see the Qt documentation about adding SSL support to your Qt application.

Install prerequisites for Android development

Note:
This section only applies to you if you are developing apps for the Android platform. If not, then proceed to the following section in this topic, titled Install prerequisites for iOS development.

Install the prerequisite software for Android app development, including the Java SE Development Kit, Android SDK Tools, Android Platform Tools, and the Android NDK. See Qt for Android for more details information on developing for Android with Qt. Also, be sure to install software versions that conform to the ArcGIS Runtime SDK for Qt System Requirements.

  1. Browse to Getting Started with Qt for Android. Follow the instructions there to download and install the prerequisite software. It is suggested that you create a new staging folder to store all the prerequisite software, such as ~/Android. This folder is referred to in these instructions as <staging folder>.
  2. Download the Qt Framework for Android (on Mac) from The Qt Company.
  3. Run the Qt Framework for Android installer, accepting all the defaults.
  4. OpenSSL libraries for Android are included with the SDK for testing purposes only. Apps you build that use prf files included with this SDK, including the ArcGIS Runtime app templates and sample apps, use these OpenSSL libraries. These libraries are not intended to be deployed to end users. Before deploying your app to end users, please obtain the latest OpenSSL libraries and deploy those with your app. For more information, see the Qt documentation about adding SSL support to your Qt application.
  5. In Qt Creator, click Qt Creator > Preferences > Android, and fill in the paths. Paths will be similar to the following:
    • JDK Location: <staging folder>/CurrentJDK/Home
    • Android SDK Location: <staging folder>/adt-bundle-mac-x86_64-<date>/sdk
    • Android NDK Location: <staging folder>/android-ndk-<version>
    • Ant Location: <staging folder>/apache-ant-<version>/bin/ant

Note:

For developers choosing to use an Android Virtual Device for testing a deployment from Qt Creator, it is important that you check the Use Host GPU check box under Emulation Options on the dialog box for creating a new AVD.

Install prerequisites for iOS development

If you plan on developing applications for the iOS platform, you must install Xcode. See Qt for iOS for more information on Qt for iOS. If you are not planning to develop for iOS, proceed to the section of this topic titled Tell Qt Creator where to find the Qt Framework.

  1. In Xcode, click Xcode > Preferences.
  2. On the Downloads tab, click Component, and download the iOS simulator.
  3. Configure your Xcode for Distribution by following the documentation at Apple's web site.
  4. Download and install the Qt Framework for iOS (on Mac) from The Qt Company.

Tell Qt Creator where to find the Qt Framework

It is typical to use one Qt Creator IDE with multiple Qt Frameworks, such as one Framework for desktop development and another to build and deploy to a mobile device. Qt Creator needs to know where to find the Qt Frameworks you want to use. It looks for Qt Frameworks on your development machine but may not detect all the Qt Frameworks you want to use. This can happen when you have multiple Qt Frameworks on your development machine, or if you later install another Qt Framework.

Follow these steps to tell Qt Creator about additional Qt Frameworks:

  1. Click Qt Creator > Preferences > Build & Run > Qt Versions, and click Add.
  2. Browse to the qmake.exe file in the installation location.
  3. Provide a suitable name for this Qt Framework.
  4. Click Apply.

After completing these steps, the Qt Framework you specified will appear under the heading Manual. You can now use these Qt Frameworks to configure kits and projects.

Repeat these steps for the Qt Frameworks for Android and iOS if you installed them.

Install ArcGIS Runtime SDK for Qt

  1. Make sure you have read/write access to your desired download location.
  2. Click the product's download link.
  3. Open the downloaded dmg file and run the installer app.
  4. After the installer app finishes, the post-installer starts. The post-installer integrates the ArcGIS Runtime SDK for Qt with your installation of the Qt Framework and Qt Creator by copying files into the Qt install locations. Choose the Qt components you want to configure. Choose only components that are installed on your development machine. For each component you choose, provide a path to the component. For Qt Creator, use the path to the Qt Creator app. For Qt Frameworks, use the path to the qmake executable in the Framework's install location. Note that the post-installer needs read/write access to ~/.config.
  5. If you want to use StreetMap Premium data in your app, download the regions you want, as described in Add StreetMap Premium data.

Configure kits and projects

In Qt Creator, a kit defines how to build an app for a target device. A kit includes references to the compiler, the Qt Framework, and the debugger.

  1. Click Qt Creator > Preferences > Build & Run > Kits.
  2. Examine the existing kits. If no existing kit has the settings you want, click Add to create a new kit.
  3. Give the kit an appropriate name.
  4. Set Device type to Desktop.
  5. Choose the Qt Version.
  6. Click OK or Apply to finish creating the kit.
  7. Repeat steps 2–6 to add Android kits if you installed the Qt Framework for Android.
  8. Repeat steps 2–6 to add iOS kits if you installed the Qt Framework for iOS.
  9. Create a project in Qt Creator for your ArcGIS Runtime SDK for Qt app. You can use a provided project template to create a new project. See Develop your first map app for more information about using a project template.
  10. When you open a Qt Creator project file for the first time, Qt Creator prompts you to configure the project. This means choosing the kits you want to use with the project. Choose the kit you created in the earlier step, and click Configure Project.

You can now build your project in Qt Creator.

Related topics