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.

这个问题碰到两次了,现在做一个简单的记录,以后可以直接使用。

问题描述:

iOS15.4.1发布之后,我将系统升级到了最新,然后使用Xcode编译运行时提示如下:

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.

其实主要原因就是iOS系统更新之后,Xcode下没有相应版本的开发调试包,在网上寻找答案时,有的回答是把手机关机,重启之后,就可以了,但是我尝试之后并没有成功,收来在stack overFlow上找到了这个比较靠谱的方法:

首先在iphone开发包地址 下载和你最新系统的开发调试包;

然后将这个包解压到mac的/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/,然后重启Xcode就好了(也许可以不重启,我比较喜欢重启大法?)。

 

Share