安装Xcode15

Xcode15安装还是有比较多的坑的

Posted by Deavan on September 10, 2023

1.1 安装Xcode15-beta4

Xcode15以前的版本可能会有卡死问题,在15beta版本有很大改善,推荐安装,具体版本目前beta2可能有需要添加ld64链接,推荐beta4

https://developer.apple.com/xcode/ 下载对应的版本和模拟器,找到 Xcode 15 beta 4 的下载链接。这里推荐使用Safari下载,支持断点续传。 enter image description here 下载完成后,打开所得的 .xip文件,等待(漫长的)自解压完成,将 Xcode-beta.app 拖动到应用程序文件夹,然后双击启动。

1.2 离线安装模拟器

官方指导链接https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes

根据下面的shell,依次添加对应的模拟器。

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

1.3 可能存在的问题

  1. 下载模拟器失败 换下源或者找别人拷一份,断点续传问题可以使用Safari。
  2. 链接问题 enter image description here 添加ld-64选项
  3. undeclared identifier ‘assert’ 对应文件添加#include
  4. 系统版本过低 xcode15需要至少macOS 13.3版本以上。