The iOS Simulator (Mac-only) offers a fast way to run and
debug iOS applications. When testing with the iOS simulator, you
do not need a developer certificate or a provisioning profile. You
must still create a p12 certificate, although it can be self-signed.
By default ADT always launches the iPhone simulator. To change
the simulator device, do the following:
Use the command below to view the available simulators.
xcrun simctl list devices
The output appears similar to the one shown below.
== Devices ==
-iOS 10.0 –
iPhone 5 (F6378129-A67E-41EA-AAF9-D99810F6BCE8) (Shutdown)
iPhone 5s (5F640166-4110-4F6B-AC18-47BC61A47749) (Shutdown)
iPhone 6 (E2ED9D38-C73E-4FF2-A7DD-70C55A021000) (Shutdown)
iPhone 6 Plus (B4DE58C7-80EB-4454-909A-C38C4106C01B) (Shutdown)
iPhone 6s (9662CB8A-2E88-403E-AE50-01FB49E4662B) (Shutdown)
iPhone 6s Plus (BED503F3-E70C-47E1-BE1C-A2B7F6B7B63E) (Shutdown)
iPhone 7 (71880D88-74C5-4637-AC58-1F9DB43BA471) (Shutdown)
iPhone 7 Plus (2F411EA1-EE8B-486B-B495-EFC421E0A494) (Shutdown)
iPhone SE (DF52B451-ACA2-47FD-84D9-292707F9F0E3) (Shutdown)
iPad Retina (C4EF8741-3982-481F-87D4-700ACD0DA6E1) (Shutdown)
You can choose a specific simulator by setting the environment variable AIR_IOS_SIMULATOR_DEVICE, as follows:
export AIR_IOS_SIMULATOR_DEVICE = 'iPad Retina'
Restart the process after setting the environment variable and
run the application on the simulator device of your choice.
Note: When using ADT with the iOS Simulator, you must always include
the ‑platformsdk option, specifying the path to
the iOS Simulator SDK.
To run an application in the iOS Simulator:
Use the adt -package command with either -target ipa-test-interpreter-simulator or -target ipa-debug-interpreter-simulator,
as the following example shows:
-storetype pkcs12 -keystore Certificates.p12
Note: Signing options are no longer required in case of simulators now, so any value can be provided in -keystore flag as it will not be honored by ADT.
Use the adt ‑installApp command to install the application
in the iOS Simulator, as the following example shows:
Use the adt ‑launchApp command to run the application in
the iOS Simulator, as the following example shows:
Note: By default, the command adt -launchApp runs the application in the iPhone simulator. To run the application in the iPad simulator, export the environment variable, AIR_IOS_SIMULATOR_DEVICE = "iPad" and then use the command adt -launchApp.
To test a native extension in the iOS Simulator, use the iPhone-x86 platform name
in the extension.xml file and specify library.a (static
library) in the nativeLibrary element, as the following
extension.xml example shows:
Note: When testing a native extension in the iOS Simulator, do not
use the static library (.a file) that is compiled
for the device. Instead, be sure to use the static library that
is compiled for the simulator.