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.
Use the same app files that you edit in AppStudio.
Copy app files from AppStudio to the virtual device.
Support connectivity to the physical device.
Autoinstall AppStudio Player.
Autoconnect to AppStudio Console.
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 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 then choose the simulator version you want to download.
When a simulator is opened from AppStudio, AppStudio Player automatically installs (if necessary) and opens in it. The simulator directly reads and loads app files from your desktop computer, so the player will automatically display all your apps immediately. Apps running in AppStudio Player on the simulator will also automatically output information to the AppStudio Console.
Only one iOS simulator can run at a time. If you want to change the simulator, shut down your current simulator first. Then open a new one.
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.
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 choose Sync All Apps. This will copy all apps on your desktop machine to the emulator as well as install AppStudio Player. If you have many apps on your desktop, it may take several minutes the first time you sync. After this initial sync, you will also be able to only sync files for the app highlighted in AppStudio.
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 Player 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.
- Minimum supported level—Because of a limitation in OpenGL implementation on Android emulators, AppStudio Player will only run on Android emulators running API levels 23 (Android 6.0) and above. This does not change the specifications of the player or your own AppStudio apps, which have a minimum specification of API level 19 (Android 4.4).
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 this list 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.