Configuration for iOS native app testing on VMs
Testing your native iOS App on a Virtual Machine
Setting up your application file for testing:
To run tests on an iOS VM, follow these steps to set up your app as a .app file:
1. Generate a simulator build using the
Make sure xcode Command Line tools are installed. They come bundled with xcode.
To build simulator builds you need to build your app for x86 64-bit. The command you will run to make the build should look similar to this:
xcodebuild ENABLE_BITCODE=NO -workspace '/path/to/YourWorkspace.xcworkspace' -scheme 'myScheme' -arch x86_64 -sdk iphonesimulator
ENABLE_BITCODE=NOturns off bitcode for the build.
-schemeis the build scheme. You may instead need to use
-target myTarget, depending on your setup.
-arch x86_64sets the build to be 64-bit which will let it run on simulators. If you need to build 32-bit use
-arch i386. Apple deprecated 32-bit support in iOS 11 so most builds should be 64-bit now. Your app MUST be built with one of these to run on simulators.
-sdk iphonesimulatorsets the sdk to simulator. If you want a specific sdk you can list your installed sdks with
xcodebuild -showsdksand change the option to be explicit:
- Depending on your setup you may need to use the option
- If you need more help with xcodebuild check out Apple's documentation here and here.
- IMPORTANT: Test that your
.appworks on a local iOS simulator by dragging and dropping the
.appfile onto your local xcode simulator. If it does not work on your local iOS simulator, it won't work on ours.
- IMPORTANT: Zip the .app file produced by the command. Rainforest supports .zip , .tar and .gz
2. Host your app somewhere that supports direct downloads.
- The hosted file URL MUST be a direct download link. If this is not the case, Rainforest will not be able to install the .app file.
- Do not use links that redirect, require credentials, or limit access; the link should lead to a direct download.
3. To set up your app for testing, simply add a link to your iOS .app file under ‘Apps’ in your site settings, and set the device 'Type' to ‘iOS’
- Please Note: if you set the 'Type' to 'iOS Device Farm' your runs will error due to the difference between file types (.ipa for iOS device testing and .app for iOS VM testing)!
Creating a new native iOS test
- To create a new test for your native iOS application, click New Test, then select ‘App’
2. Click the drop-down, and select the URL for the .app file you wish to test
- NOTE: As Rainforest will automatically download, install and start your application for testing, you cannot select non-iOS VMs for this test.
3. To preview the test hit the Glasses Icon or to run the test, select the 'Run Test' button and then 'Run' to choose the iOS VM from the Platforms section.
Can I reuse my existing web tests?
In most cases, a company’s web app and native app are fundamentally different, so you will not be able to reuse your existing web tests for your native app. However, in some cases, you can (and should!) reuse the work that you have already done.
If your mobile and web apps are very similar, you can simply copy the appropriate tests for your web app to a new test for your mobile application.
Native mobile app and web application tests are separated in the Rainforest interface, since they cannot share a starting URL.
- The URL for a web browser test serves as a direction for the testers
- The URL for a native app test is a source, where Rainforest will access and install your native application
Supported Devices for VM testing
|Platform Name||Architecture||OS||Browser Version|
|iOS Ipad Air 2||x86_64||iOS 12||Safari 12|
|iOS Ipad Air 2||x86_64||iOS 11||Safari 11|
|iOS Iphone 4S||x86||iOS 8.0||Safari 8|
|iOS iPhone 5S||x86_64||iOS 11||Safari 11|
|iOS iPhone 6+||x86_64||iOS 9.3||Safari 9|
|iOS iPhone 6S+||x86_64||iOS 10.3.1||Safari 10|
|iOS iPhone 6S||x86_64||iOS 10.3.1||Safari 10|
|iOS iPhone 6||x86_64||iOS 8.4||Safari 8|
|iOS iPhone 6||x86_64||iOS 9.3||Safari 9|
|iOS iPhone 7||x86_64||iOS 10.3.1||Safari 10|
|iOS iPhone 7+||x86_64||iOS 10.3.1||Safari 10|
|iOS iPhone 8||x86_64||iOS 11.2||Safari 11|
|iOS iPhone 8+||x86_64||iOS 11.2||Safari 11|
|iOS iPhone X||x86_64||iOS 11.2||Safari 11|
|iOS iPhone X||x86_64||iOS 12||Safari 12|
App won’t load? Take a look at the following
Testing your build
If your app is not running properly on Rainforest’s VMs, we strongly recommend that you test it locally to ensure that your application is configured properly for running in a simulator. Try the following code to test that your build loads as expected on a simulator.
# list devices
xcrun simctl list
Ex: iPhone 7 (BCFE928E-1FFB-446B-A41C-288558412F0D) (Shutdown)
# open the simulator
open -a /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator --args -CurrentDeviceUDID BCFE928E-1FFB-446B-A41C-288558412F0D
# install .app
# xcrun simctl install <YOUR-DEVICE-ID> <PATH-TO-APPLICATION-BUNDLE>
xcrun simctl install BCFE928E-1FFB-446B-A41C-288558412F0D /tmp/Example.app
# get bundle ID
osascript -e 'id of app "/tmp/Example.app"'
# Ex: com.rainforestqa.ExampleApp
# launch app
#xcrun simctl launch <YOUR-DEVICE-ID> <BUNDLE-ID-OF-APP-BUNDLE>
xcrun simctl launch BCFE928E-1FFB-446B-A41C-288558412F0D com.rainforestqa.ExampleApp
# terminate app
xcrun simctl terminate BCFE928E-1FFB-446B-A41C-288558412F0D com.rainforestqa.ExampleApp
# unistall app
xcrun simctl uninstall BCFE928E-1FFB-446B-A41C-288558412F0D com.rainforestqa.ExampleApp
# shutdown the simulator
xcrun simctl shutdown BCFE928E-1FFB-446B-A41C-288558412F0D
Make sure your app URL is a direct download link
The hosted file URL MUST be a direct download link. If this is not the case, Rainforest will not be able to install the .app file.
- “Note: If you are using a Dropbox link, please make sure it ends in dl=1. See Dropbox help for more info.[https://www.dropbox.com/en/help/201]"
- Some users have used this workaround for Dropbox
- These applications do not need to be signed.
Verify Site URL
Rainforest will add a trailing slash "/" when launching running the test. This will sometimes lead to an error that does not allow the test to direct to the correct URL which will fail the test. This can be avoided by adding a "#" to the end of your site url.
Our testers come from various IP address, secure environments may block testers from reaching your site. Whitelisting Rainforest IP addresses may be required.