0

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?

sCha
  • 1,454
  • 1
  • 12
  • 22

2 Answers2

1

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

Templar
  • 1,694
  • 1
  • 14
  • 32
0

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.

sCha
  • 1,454
  • 1
  • 12
  • 22