Deleted Xcode 9 beta, Swift Compiler Error

875 Views Asked by At

Had been using Xcode 9 beta for a while, and then I updated Xcode 9 since now it has an official update. Then I removed the beta from my Desktop.

Now I have a problem compiling my project with the following error:

Header '/Users/sahn/Desktop/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk/usr/include/CommonCrypto//CommonCrypto.h' not found

I've tried cleaning the project, cleaning build folder... but that Xcode-beta.app location won't go away.

How can I fix this?

2

There are 2 best solutions below

0
sCha On BEST ANSWER

It turns out that the problem was an external framework, internally uses CommonCrypto framework, and the framework was compiled previously with the Xcode Beta.

Simply fixed by recompiling dependencies.

1
Templar On

Didn't work with XCode for almost a year now, but this usually could be fixed before with

xcode-select --switch /Applications/Xcode.app/Contents/Developer

This command is used to switch the location of the XCode. Might need sudo.

Documentation is here btw : https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/xcode-select.1.html