It keeps saying:
fatal error: file \'/Applications/Xcode5-DP5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/includ
Open a terminal and type in : rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache/*
Clean your project and build again. Worked for me.
Run this script to delete all relevant files in /Library/Developer/Xcode/DerivedData
and /var/folders
:
# run with
# ruby reallyCleanXcode.rb
derivedDataFolder = Dir.glob(Dir.home + "/Library/Developer/Xcode/DerivedData/*")
moduleCache = Dir.glob("/var/folders/**/com.apple.DeveloperTools*")
FileUtils.rm_rf derivedDataFolder + moduleCache
I solved this by:
Quit restart Xcode + clean project + clean build folders + clean derived data + deleted the /var/folders/.../.../C/com.apple.DeveloperTools/5.0.2-5A3005/Xcode/SharedPrecompiledHeaders + unplugged my iPhone
Rebuild and works :)
This happen when compiling, when running the app or neither?
Have you tried this:
Build Settings - Build Locations - Precompiled Header Cache Path -- there's a folder... delete it.
I was having the same problem. I did SHFT+CMD+K and tried to run,again the error appeared. My error pointed to the NSJSONSerialization header file. So what I did is deleted the files in ModuleCache and the project seems working now. I had changed my code which used NSJSonSerialization thinking it to be wrong, and project started working with the code also :)
To delete the files -- Click on 'Go' in the Desktop and then 'Go to folder' then type the folder path (Eg : 'Library/.…./ModuleCache') and delete all the files.
Regards, ASK
my solution,
in terminal, run command:
rm -rf /Users/jackiexu/Library/Developer/Xcode/DerivedData/ModuleCache/2MWVPCGUMQ29P
then in xcode, clean then restart xcode and build