一、遇到的問題
? ? ? ? 運(yùn)行Xcode然后打包APP,結(jié)果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? ? ?Version 14.2 (14C18)
? ? ? ? IOS? ? ? ? ? 16.4.1(a)
? ? ? ? 最近手機(jī)自動升級了版本,造成Xcode不兼容,需要處理一下。
三、增加Xcode系統(tǒng)支持
? ? ? ? ??
進(jìn)入 iOSDeviceSupport? 項(xiàng)目(或者Github)
下載你需要支持的系統(tǒng)文件
然后再啟動臺的「其他」文件夾打開終端,輸入
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
?然后新建一個文件夾,例如我是16.4,我就新建一個16.4文件夾
?之后將解壓好的內(nèi)容全部粘貼進(jìn)去。
然后重啟Xcode。
如果還不行,請重啟手機(jī)。文章來源:http://www.zghlxwxcb.cn/news/detail-658561.html
?文章來源地址http://www.zghlxwxcb.cn/news/detail-658561.html
到了這里,關(guān)于Xcode真機(jī)運(yùn)行報錯:Failed to prepare the device for development解決方法的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!