安裝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/