模式切换
Failed to prepare the device for development.
【问题】使用 Xcode 连接真机 iPhone 时,出现 Failed to prepare the device for development.
的错误。
笔者相关软件设备信息:
Xcode 14.2
iOS 16.7
bash
Failed to prepare the device for development.
This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode.
You may also need to restart your Mac and device in order to correctly detect compatibility.
【解决】
原因是 Xcode 与 iOS 版本不兼容,没有找到对应设备支持包。
来到 Gitee - iOSDeviceSupport 下载对应 iOS 版本的设备支持包,解压后放到 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
目录下,重启 Xcode 即可。
笔者下载的是 iOS 16.6,同样支持 iOS 16.7