个人技术分享

问题:

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
iOS(ipad) 15.8.x
Xcode不兼容该版本系统,需要处理一下。

解决:

增加Xcode系统支持

进入 iOSDeviceSupport 项目下载你需要支持的系统文件

https://gitee.com/Han0/iOSDeviceSupport/tree/master/iOSDeviceSupport

然后打开终端,输入

open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

然后将下载的需要支持的系统( 如:15.8)文件拖进去,然后重启Xcode。

15.8 的系统文件还有一点需要注意:
手机升级到iOS15.8后无法在xcode(14.2)上真机调试

在这里插入图片描述

其他:

Signing for "xxx" requires a development team. Select a development team

出现这个问题的原因是你的team没有设置对。

解决办法,TARGETS–>Genernal–>Signing–>team,选择合适的选项,编译即可

或者更改一下Bundle Identifier 。

在这里插入图片描述