iOS Xcode手动添加iOS模拟器运行时

2024-07-21  本文已影响0人  蔡胜波

官方文档

Install and manage Simulator runtimes from the command line

You can download and export the simulator runtimes images in Terminal with the xcodebuild command.

Note

The simulator runtimes are available on Apple Developer website, but will no longer be posted through the website in future updates. Please use the xcodebuild -exportPath option.

Then follow these steps in Terminal to install a simulator runtime:

  1. In Terminal, use xcode-select -s <path-to-Xcode> to select the version of Xcode that you want to add the simulator runtime to.

  2. Run xcodebuild -runFirstLaunch to install the required system components, including the simctl utility.

  3. Run xcrun simctl runtime add "~/Downloads/<simulator-runtime-name>.dmg" to install the simulator runtime. simctl verifies the signature of the downloaded simulator runtime, and installs it on your Mac.

For example:

    xcode-select -s /Applications/Xcode-beta.app
    xcodebuild -runFirstLaunch
    xcrun simctl runtime add "~/Downloads/watchOS 9 beta Simulator Runtime.dmg"
上一篇 下一篇

猜你喜欢

热点阅读