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。

如果還不行,請重啟手機。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容