安装Xcode 9后,Xcode 8在编译项目时会出现错误:
error: Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform <DVTPlatform:0x7fa25a60fc20:'com.apple.platform.iphonesimulator'<DVTFilePath:0x7fa25a60fab0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform'>>
移动iOS 10.3.simruntime可以解决这个问题,
sudo mkdir/Library/Developer/CoreSimulator/Profiles/Runtimes/Backup
sudo mv/Library/Developer/CoreSimulator/Profiles/Runtimes/{,Backup/}iOS\10.3.simruntime
sudo killall-9com.apple.CoreSimulator.CoreSimulatorService
然后重新启动Xcode,Simulator等;那些删除了CoreSimulator.framework,因此无法再运行Xcode.app,可以重新安装CoreSimulator.framework
installer-pkg/Applications/Xcode-beta.app/Contents/Resources/Packages/XcodeSystemResources.pkg-target/
网友评论