XCode5中出现如下报错信息:
fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIView.h' has been modified since the precompiled header '/Users/***/Library/Developer/Xcode/DerivedData/ModuleCache/2J9EDR4ZZDYXU/UIKit.pcm' was built
note: after modifying system headers, please delete the module cache at '/Users/***/Library/Developer/Xcode/DerivedData/ModuleCache/2J9EDR4ZZDYXU'
1 error generated.
看报错信息应该就能知道是你不小心修改了SDK中的UIView.h的内容引起的,比较蛋疼的就是XCode5之前的SDK是不允许修改SDK中的代码的,即便修改了也会提示。可是XCode5中就没有提示了,所以一不小心就会报以上错误。
具体解决办法是:
1. 删除/Users/***/Library/Developer/Xcode/DerivedData/ModuleCache/2J9EDR4ZZDYXU文件下的内容。
2. Product -> Clean。(这时上述文件夹中将重新生成系统SDK的数据)