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不兼容,需要处理一下。

三、增加Xcode系统支持

  1. 进入1: Gitee: iOSDeviceSupport 项目
    或进入2:Gitcode 项目

    image.png

  2. 下载你需要支持的系统文件, 并解压:


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

open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  1. 将第2步解压的文件夹全部复制到该目录下


    image.png
  2. 然后重启Xcode。

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容