A Simulator runtime is an embedded OS package that Simulator loads when running your app on a simulated device in Xcode. For example, when you test your app on a simulated iPhone running iOS 17, Simulator loads the iOS 17 Simulator runtime on the simulated device.
To minimize download size, Xcode splits the Simulator runtimes for each platform into individual installs. This allows you to install only the Simulator runtimes specific to the platform you’re developing for. Xcode requires the current versions of Simulator runtimes to build projects and to run Simulator for those platforms.
If you download Xcode from the Apple Developer website, you can choose which Simulator runtimes to include. If you download Xcode from the Mac App Store, you can download and install these files when you first launch Xcode, or install them later from the Xcode run destination, from Xcode Settings, or from the command line.
Manage the amount of storage that Xcode requires by choosing Xcode > Settings > Platforms to view the currently installed Simulator runtimes, and remove any that you don’t need. You can reinstall or install additional Simulator runtimes at any time.
Starting with Xcode 15, you can select the platforms you want to download from the Apple Developer website.
Select the checkbox next to each platform you want to develop for, and then click the Download button. This initiates downloading Xcode, the selected platforms, and a manifest file to your Downloads folder. Don’t move the simulator and manifest files outside the Downloads folder during installation. When the selected simulator and manifest files finish downloading, Xcode automatically installs them from the Downloads folder.
When you launch Xcode 14 or later for the first time, Xcode presents a dialog that indicates which Simulator runtimes are built-in, and which Simulator runtimes you may download. Select the checkbox next to a downloadable Simulator runtime, and then click Continue to download and install it. Xcode displays a status dialog while it downloads and installs the files for each platform you select.
You may create a new Xcode project or work with an existing Xcode project on a platform that Xcode is installing, but you may not run or build the project until Xcode finishes downloading and installing the files.
When you open an Xcode project for a platform that doesn’t have any installed Simulator runtimes, Xcode displays a Get button next to the run destination. Click the Get button to download and install the most current Simulator runtime for that platform.
The run destination in your Xcode project indicates when Xcode is downloading a Simulator runtime. You can select a run destination when the download and installation completes.
Choose Xcode > Settings > Platforms to see a list of Simulator runtimes that are currently installed and available to download. Xcode shows the amount of storage you can recover if you remove an installed Simulator runtime, and displays Built-In for a Simulator runtime that Xcode requires.
To recover storage space from unused Simulator runtimes, select a Simulator runtime, click the Delete button (-) in the lower left corner, and click Delete in the confirmation dialog.
To install the current version of a Simulator runtime, click its Get button. For previous versions, click the Add button (+) in the lower left corner, and then select a platform to view a list of its available versions. Select a version, and click Download & Install. You can run projects on previous versions of the Simulator runtime, but you need to install the current version to build them.
Download the Simulator runtime you want to install from the Apple Developer website. Then follow these steps with the command line to install it:
Select a version of Xcode.
Run the first launch experience to install the required system components, including simctl
.
Install the Simulator runtime with simctl
.
simctl
verifies the signature of the downloaded Simulator runtime, and then installs it in a secure location on your computer.
For example:
xcode-select -s /Applications/Xcode-beta.app
xcodebuild -runFirstLaunch
xcrun simctl runtime add "~/Downloads/watchOS 9 beta Simulator Runtime.dmg"
To download and install all the platforms that the Xcode version you selected supports, use the -download
option on xcodebuild
.
xcodebuild -downloadAllPlatforms
To download and install Simulator runtimes for a specific platform, use the -download
option and specify the platform.
xcodebuild -downloadPlatform iOS
联系客服