我電腦上裝了xcode8.3和xcode9,因為我這幾天用的xcode9在適配iOS 11,今天想順便用xcode9打個包,發現證書有問題,我就用想先用xcode8.3打包吧,結果遇到這個問題,大概是因為裝了xcode8.3跟xcode9,項目中使用了coredata才會出現這個問題,記錄一下:
在stackoverflow上找到了解決辦法:
1.關閉Xcode
2.終端輸入以下命令:
sudo mkdir /Library/Developer/CoreSimulator/Profiles/Runtimes/Backup
sudo mv /Library/Developer/CoreSimulator/Profiles/Runtimes/{,Backup/}iOS\ 10.3.simruntime
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService
3.打開xcode,clean一下,運行,解決
原文有解釋,最后附上原文鏈接:https://stackoverflow.com/questions/44471971/xcode-9-bug-cannot-find-cdtool/44907934