【iOS】This operation can fail if the version of the OS on the device is incompatible
Failed to prepare 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 版本不兼容,此操作可能会失败。您可能还需要重新启动 Mac 和设备才能正确检测兼容性。
其实主要原因就是iOS系统更新之后,Xcode下没有相应版本的开发调试包,在网上寻找答案时,有的回答是把手机关机,重启之后,就可以了,但是我尝试之后并没有成功,收来在stack overFlow上找到了这个比较靠谱的方法:
首先在iphone开发包地址 下载和你最新系统的开发调试包;
/filsv/iOSDeviceSupport
然后将这个包解压到mac的/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/
然后重启Xcode
重启Xcode没管用,我又重启的电脑,已跑通