Xcode运行报错:Failed to prepare the device for development

遇到的问题

运行Xcode 然后打包APP,结果Xcode报错,如下:

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版本库

增加Xcode系统支持

下载你需要支持的系统文件 ,进入 iOSDeviceSupport项目(或者Github


然后再启动台的「其他」文件夹打开终端,输入

open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

然后新建一个文件夹,例如我是16.4,我就新建一个16.4文件夹

之后将解压好的内容全部粘贴进去。

然后重启Xcode。

如果还不行,请重启手机。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容