Xcode Simulator

升级Xcode之后创建项目提示需要下载iOS 17.2版本的模拟器

需要下载iOS 17.2 Simulator

下载中⌛️

下载中⌛️

等待很久之后报下载失败

下载失败💔

原因是失去了网络连接

失败原因:lost connection

重试很多次依然如此,但是可以排除网络问题。在开发者论坛看到类似的讨论:same issuehttps://forums.developer.apple.com/forums/thread/740040

跳转到苹果官方给出的方案:https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes#

install and manager simulator runtimes

最终解决方案是,手动下载然后通过命令行安装

模拟器下载地址:https://developer.apple.com/download/all/ 进入这里需要登录开发者账号。

Apple download all

搜索模拟器iOS Simulator

Apple downloading search simulator

出现很多版本的模拟器,包括iOS17.4 beta,这里我们只需要iOS 17.2,所以我们搜索指定版本

iOS 17.2 Simulator search

找到指定版本,点击View Details即可看到下载runtime.dmg的地址

iOS 17.2 Simulator downloading

点击即可下载⏬。

simulator手动下载中⌛️

这里直接给出具体的下载链接🔗 👇https://download.developer.apple.com/Developer_Tools/iOS_17.2_Simulator_Runtime/iOS_17.2_Simulator_Runtime.dmg

安装方法:

sudo xcode-select -s /Applications/Xcode.app

需要输入密码,然后

xcodebuild -runFirstLaunch

接着:

xcrun simctl runtime add "/Users/rayvision/Downloads/iOS_17.2_Simulator_Runtime.dmg"

这里引号内的地址,可以直接找到下载的文件拖拽过来,会验证runtime。

simulator runtime validate

最后验证完成出现👇就完成了。

D: F56EFCE4-115C-490B-881C-C86B00B23EEB iOS (17.2 - 21C62) (Ready)

simulator add