如果您在终端中运行命令xcrun simctl list runtimes,您将看到类似于此的输出:
== Runtimes ==
iOS 11.4 (11.4 - 15F79) - com.apple.CoreSimulator.SimRuntime.iOS-11-4 (unavailable, The iOS 11.4 simulator runtime is not supported on hosts after macOS 11.99.0.)
iOS 12.0 (12.0 - 16A366) - com.apple.CoreSimulator.SimRuntime.iOS-12-0 (unavailable, The iOS 12.0 simulator runtime is not supported on hosts after macOS 11.99.0.)
iOS 15.2 (15.2 - 19C51) - com.apple.CoreSimulator.SimRuntime.iOS-15-2
tvOS 15.2 (15.2 - 19K50) - com.apple.CoreSimulator.SimRuntime.tvOS-15-2
watchOS 8.3 (8.3 - 19S51) - com.apple.CoreSimulator.SimRuntime.watchOS-8-3
根据您在系统上安装的模拟器,您的输出可能会有所不同。
看起来,某些版本的 iOS 与 macOS 12+ 不兼容。
即使您尝试从终端执行此操作,例如:
xcrun simctl create 'iPhone 5s (12.0)' com.apple.CoreSimulator.SimDeviceType.iPhone-5s com.apple.CoreSimulator.SimRuntime.iOS-12-0
你会得到如下错误:
Unable to create a device for device type: iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s), runtime: iOS 12.0 (12.0 - 16A366) - com.apple.CoreSimulator.SimRuntime.iOS-12-0 (unavailable, The iOS 12.0 simulator runtime is not supported on hosts after macOS 11.99.0.)
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=401):
The iOS 12.0 simulator runtime is not available.
The iOS 12.0 simulator runtime is not supported on hosts after macOS 11.99.0.
The iOS 12.0 simulator runtime is not supported on macOS 12.0.1
我还没有找到兼容的 iOS 模拟器的列表,也没有解决方法。