一不小心修改了系统的头文件解决方案

当我们在查看头文件信息时,一不小心会把头文件修改了,之后运行程序就会报下面的错误:
fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h' has been modified since the precompiled header '/Users/ligang/Library/Developer/Xcode/DerivedData/ModuleCache/1O5WP9283VGUA/Foundation.pcm'
was built

note: after modifying system headers, please delete the module cache at '/Users/ligang/Library/Developer/Xcode/DerivedData/ModuleCache/1O5WP9283VGUA'

1 error generated.

解决办法:

前往 /Users/ligang/Library/Developer/Xcode/DerivedData/ModuleCache/1O5WP9283VGUA这个文件夹,删除其文件夹中的内容,然后运行app,没问题了,注意不是删除 2NEVAP7X943D2 文件夹,而是其中的内容。然后再 clean下项目就可以了(product -> clean)

你可能感兴趣的:(一不小心修改了系统的头文件解决方案)