How do I add different simulators to my iOS builds?

The Xcode images are preinstalled with recent versions of the simulator runtime. A list of the simulator runtimes, along with simulator devices, can be found in the image manifest

Adding a simulator runtime:

If a different simulator runtime is required for your tests, you can install them in your environment.

 

Previously you could use the xcode-install gem to download these within your job. For example:

-run: gem install xcode-install
-run: xcversion simulators --install="13.2"

The install xcode-install method has now been deprecated, so the new recommended method would look more like this:

run: |
brew tap robotsandpencils/made
brew install robotsandpencils/made/xcodes
xcodes runtimes install 'iOS 16.0'

 

Please note that downloading additional simulator runtimes may increase build times.

Creating a new simulator:

If you need to create a specific simulator combination that is not provided by default, you can create these with the xcrun simctl create command. An example may look like this:

run: xcrun simctl create "iPhone 11 with iOS 16" "iPhone 11" iOS16.0

 

Additional Resources:

Was this article helpful?
17 out of 39 found this helpful

Comments

0 comments

Article is closed for comments.