ArcGIS AppStudio has integrated support for virtual devices, including iOS simulators and Android emulators. These virtual devices are intended for testing your app on platforms that are not present on your physical device.
iOS simulators and Android emulators have slightly different capabilities and levels of integration with AppStudio. To ensure that the functionality you're attempting to use is supported by your virtual platform of choice, refer to the following table:
Functionality | iOS simulator | Android emulator |
---|---|---|
Open multiple sessions. | No | Yes |
Copy app files from AppStudio to the virtual device. | Yes | Yes |
Support connectivity to the physical device. | No | Yes. For more information see Connected Android devices. |
Autoinstall AppStudio AppRun. | Yes | Yes |
Autoconnect to AppStudio Console. | Yes | Yes |
To use a virtual device with AppStudio, you must first install development tools for your target environment. Then, in AppStudio, click the Virtual Device button to open a menu that lists all virtual devices found.
iOS simulators
iOS simulators are available only on macOS. The iOS simulator functionality is contained within the Xcode developer tools; however, no coding within the Xcode framework is necessary. When you install Xcode from the Mac App Store, a number of simulators are also installed to your computer. For these simulators to be visible on the AppStudio Virtual Device menu, you must also install the Xcode Command Line Tools. These tools can be downloaded from https://developer.apple.com/download/.
The minimum supported version of Xcode and the Command Line Tools is 7.0.
If you require a different version of the iOS simulator than is provided by your Xcode installation, you can download additional simulators in Xcode. Open Xcode and click Menu > Xcode > Preferences > Select Components, and choose the simulator version you want to download.
When a simulator is opened from AppStudio, AppStudio AppRun automatically installs (if necessary) and opens the selected app. Apps running in AppRun on the simulator will automatically output information to the AppStudio Console. If you want to change which app is shown in the simulator, close the app session in the simulator, select the new app in AppStudio, and select the simulator again from the Virtual Device menu.
Only one iOS simulator can run at a time.
Android emulators
Android emulation is available on macOS, Windows, and Linux and is contained within Android Studio. No coding in Android Studio is necessary. Install Android Studio and create an Android virtual device to use Android emulators in AppStudio. Android virtual devices can also be managed in Qt Creator by browsing to Tools > Options, selecting Devices from the table of contents, and opening the Android tab. Options to manage the Android virtual devices are made available when the locations for the Android Software Development Kit (SDK) bundled with Android Studio and the Android Native Development Kit (NDK) version 10e are provided. If you have already configured your machine to set up local Make for Android, these paths will already be set.
Note:
Linux machines have the following specific requirements for emulation:
- VT-x support is required.
- Both RAM and swap must be enabled.
- The mksdcard tool is required. To install mksdcard, use the following command: sudo apt-get install lib32stdc++6.
Android emulators launched in AppStudio do not directly read the app files on your desktop machine. While your emulator is running, click the Virtual Device button in AppStudio, select your active emulator, and select the app you want to sync to the emulator. This will copy the app on your desktop machine to the emulator as well as install AppStudio AppRun.
Unlike with iOS simulators, multiple Android emulators can be run at the same time.
Limitations of Android emulators include the following:
- Device performance—Typically, emulators are slower than physical devices.
- Software rendering must be enabled—This will slow your emulator, but without it, AppStudio AppRun will display a white screen. It is recommended that you sync your apps to the emulator before enabling software rendering. After you sync, you can change your rendering preference before running an app.
Connected Android devices
AppStudio can also interact with USB-connected physical Android devices in the same way as Android emulators. Despite being connected by USB, a physical device still needs to be on the same wireless network to use AppStudio Console or to connect to the internet. Only app file copying is done through the USB cable.
A connected Android device must also have debugging enabled. On some devices, you may need to authorize the device when connected to a new desktop.
Be aware that the list of available devices in the Virtual Device menu is defined and populated by Android Studio. If for any reason Android Studio is unable to detect the device, AppStudio will be unable to sync to it.