Xcode 真机报错修复:The developer disk image could not be mounted

6 阅读1分钟

解决方法

  1. 删除目录:
rm -rf /Users/gechunxi/Library/Developer/Xcode/iOS\ DeviceSupport

提示:这个目录存放的是 Xcode 为不同 iOS 版本准备的本地 DeviceSupport/符号缓存,不是你的工程源码。删除后会在下次连接设备时由 Xcode 自动重新生成,因此可安全清理(代价是首次重新连接会多等一会儿)。

  1. 卸载并重装 Xcode
  2. 执行:
sudo installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg -target /
  1. 重新连接真机并运行,恢复正常。

参考链接

SOLVED: Previous preparation error: The developer disk image could not be mounted on this device.