I want to install an older simulator runtime with command line using xcodebuild
, following instructions from this article: https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
As of October 2024, this article provides an example:
xcodebuild -downloadPlatform iOS -buildVersion 16.0 -exportPath ./SimulatorRuntimes/
However when I run this command in the terminal, it fails with error:
xcodebuild: error: invalid option '-buildVersion'
Has this option been removed? What's the correct way to install an arbitrary non-latest simulator runtime with command line?
I know I can download the runtime from the website and then import it, or I can use Xcode's GUI for that, but my eventual goal is to automate it with a single shell script.
I'm using Xcode 16.0 (16A242d) on macOS Sequoia 15.0.1.
Thanks in advance for your help!
I'm using Xcode 16.0 (16A242d) on macOS Sequoia 15.0.1.
The -buildVersion
argument is available in Xcode 16.1 beta 3 or later.
From Xcode 16.1 Beta 3 Release Notes
- xcodebuild’s download platforms command now supports an optional -buildVersion argument to request a specific released simulator runtime. The can be a build update number or the release number. Simulator runtime version that are supported versions are iOS 16.0+, watchOS 9.0+, tvOS 16+, visionOS 1.0+.
Example usage, to download, install and export the iOS 16.0 simulator runtime:
xcodebuild -downloadPlatform iOS -buildVersion 16.0 -exportPath ./SimRuntimeImages/ xcodebuild -downloadPlatform iOS -buildVersion 20A360 -exportPath ./SimRuntimeImages/ (135989441) (FB15126412)