Malformed or corrupted AST file
frameworks, ios, malformed
Solution
As requested:
What caused this error for me (after getting the new Xcode) was I would try to run a project in simulator (accidentally in simulator, I never use simulator), but I'd forget to select my device or my device would become unplugged without me noticing, and it will try to run in simulator... so I would get those classic ".o" file errors... Then I would switch back to my device and get corrupt AST files...
To CURE the problem... (Follow the steps below VERY closely!!!!!)
- Clean your project
- QUIT Xcode (CMD+Q)
- Run this Terminal Command: `rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache/*`
- Run this Terminal Command: `rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/*`
- Reopen Xcode
- MAKE SURE YOU HAVE YOUR DEVICE SELECTED AND NOT SIMULATOR
- CLEAN project (Yes, again)
- THEN build (to your device, not to simulator)...
Enjoy!
Note: After further experimentation I've found that the force-quitting of xCode is possibly not necessary.
Problem
I have a problem I don't know why did it happen in the first place but most probably because I've pressed move to trash to some system frameworks by mistake. I got an error that says: malformed or corrupted AST file: 'could not find file '/Users/username/myProject/QuartzCore.framework/Headers/CAMediaTiming.h' referenced by AST file' I've tried to copy QuartzCore.framework in that Directory. It give me then a punch of new errors. Then if I remove the framework from the Dir. Everything will be good for the project till I make any code change. Then I would have to make the previous scenario again. It's very annoying now and I really need to fix this. Anyone?