So I accidentally modified a header (CBCentralManager.h)
and caused the above error to show when I build. I searched stack overflow for the solution, and found
quit xcode and reopen it .This fixed my problem.
Deep clean (Cmd + Opt + Shft + K), clearing folder DerivedData, clearing simulator, restarting Xcode and mac doesn't work for me.
Problem was fixed only after changing pch-file (adding a whitespace or comment/uncomment some code). File was incorrectly cached on build phase by Xcode. Changing this file fixed problem.
Deleting ~/Library/Developer/Xcode and restarting Xcode fixed this for me (Xcode 6 B7). Suspect an aggressive caching bug.
No amount of cleaning / build folder cleaning / derived data deleting helped before that.
So it seems the only way to fix this issue is to uninstall Xcode and download it again. This fixed my problem.
I faced this issue on OS10.10 with Xcode 6. I resolved issue by removing .pcm files.
To delete press 'shift+command+g' & delete all .pcm files or goto the folder ~/Library/Developer/Xcode/DerivedData/ModuleCache/ & delete all .pcm files.
Perform deep clean by pressing 'shift+alt+command+k.
Hope it will work for you.
You can also try these, clean and then build again
find /var/folders 2>&1 | grep -v 'Permission denied' | grep '\.pcm' | xargs rm
find ~/Library/Developer/Xcode/DerivedData 2>&1 | grep -v 'Permission denied' | grep '\.pcm' | xargs rm