我刚刚下载了 iOS 17 运行时,但将其复制到目标位置后,会打开此弹出窗口,并且 Xcode 无法按预期使用模拟器:
从Apple开发者网站下载
我该如何解决这个问题?
可以在下载的.dmg上调用
simctl
来手动添加模拟器运行时。这是一个更安全的工作流程,还可以执行代码签名验证。命令是:
xcrun simctl runtime add <pathTo/platform_simulator_runtime.dmg>
手动将 .simruntime 复制到预期安装位置是不受支持的工作流程。
要了解更多信息,请查看 https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes
此错误是由于复制文件的某些权限造成的。 在复制文件以进行验证之前,您应该信任 DMG:
关闭 Xcode 并弹出模拟器 DMG。xattr -cr PATH_TO_DOWNLOADED_DMG
将 .simruntime
/Library/Developer/CoreSimulator/Profiles/Runtimes
)再次运行Xcode并等待验证完成xcrun
工具即时验证它们:
xcrun simctl runtime add <Drag DMG Here>
打开终端并运行
xcodebuild -downloadPlatform iOS