Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate installation of additional iOS simulator runtimes #2318

Open
Fishbowler opened this issue Feb 17, 2025 · 2 comments
Open

Automate installation of additional iOS simulator runtimes #2318

Fishbowler opened this issue Feb 17, 2025 · 2 comments
Labels
enhancement New feature request or improvement of an existing feature

Comments

@Fishbowler
Copy link
Contributor

Use case

I've just run through this dance:

danc@Dans-MBP ~ % maestro start-device --platform iOS --os-version 16     

Attempting to create iOS simulator: Maestro_iPhone11_16 
Required runtime to create the simulator is not installed: iOS-16-2

To install additional iOS runtimes checkout this guide:
* https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes

danc@Dans-MBP ~ % xcodebuild -downloadPlatform iOS -exportPath ~/Downloads/ios-16-2.dmg -buildVersion 16.2
Downloading iOS 16.2 Simulator (20C52): 11.1% (712 MB of 6.41 GB)  

The steps I'm taking come from the linked page (although appear to be a new feature). Wouldn't it be handy if Maestro could automate a bunch of this?

Proposal

Look something like this:

danc@Dans-MBP ~ % maestro start-device --platform iOS --os-version 16     

Attempting to create iOS simulator: Maestro_iPhone11_16 
Required runtime to create the simulator is not installed: iOS-16-2

Would you like to install it now? (Y/n) y

- Downloading iOS 16.2 Simulator (20C52) to /tmp/iOS-16-2.dmg
- Installing iOS 16.2 Simulator (20C52)
- Deleting temporary files
- Done!

Launching simulator...

Setting the device locale to en_US...

Anything else?

No response

Copy link

linear bot commented Feb 17, 2025

@Fishbowler Fishbowler added the enhancement New feature request or improvement of an existing feature label Feb 17, 2025
@riglar
Copy link

riglar commented Feb 17, 2025

Here's the commands we use in devicecloud.dev:

sudo xcodebuild -downloadPlatform iOS -buildVersion {{ item }} -exportPath ./SimulatorRuntimes/
sudo xcodebuild -importPlatform ./SimulatorRuntimes/iphonesimulator_{{ item }}_*.dmg

Although it's worth saying that not all runtimes are CLI friendly. For example, 18.0 could only be installed via xcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature request or improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants