Solved

How do I run an iOS Simulator test instead of a iOS Real Device test?

  • 19 March 2021
  • 1 reply
  • 41 views

Badge +1

Like the title says, how can I force an iOS simulator test instead of an iOS real device test? What capabilities must change?

icon

Best answer by dylanatsauce 29 March 2021, 03:28

View original

1 reply

Userlevel 1
Badge +2

Hey Max!

 

There’s two considerations here.  Firstly your app needs to be compatible with the iOS Simulator.  Secondly, the capabilities need to be changed from targeting a real device, to targeting the simulator.

 

Build and Upload your App to Storage

You can find instructions on building your app for the simulator in our docs.  Of note; you will have to re-build your app for the simulator you’re targeting; you can’t just re-use an existing app.  Once you’ve built your app, upload it to Sauce Storage.  Our storage docs are here.  The easiest way is to use our website, but if you’re integrating with a CI system, you might want to use the REST API instead, to automate things.

 

Set the appropriate Desired Capabilities

This is a step by step guide for transforming your capabilities, and it should work in most cases.

  1. Choose a specific iOS Simulator to use (check the available options with our platform configurator)
  2. Set deviceName to that device, ensuring you keep the “Simulator” part, eg: “iPhone 8 Simulator”
  3. If in use, remove these capabilities:
    • tabletOnly or phoneOnly
    • privateDevicesOnly
    • cacheId
    • carrierConnectivityOnly
    • noReset
    • recordDeviceVitals
    • enableAnimations
    • webkitResponseTimeout
    • webkitDebugProxyPort
    • Any of the unsupported capabilities, as listed here

Reply