简体   繁体   中英

How do I revert UIDevice.h back to the original version?

I by accident edited UIDevice.h and proceeded to build my project but received the following error:

fatal error: file '/Applications/Developer/Xcode5-DP4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h' has been modified since the precompiled header '/Users/MyName/Library/Developer/Xcode/DerivedData/ModuleCache/1EK79MZFJ723Q/UIKit.pcm' was built

I went into UIDevice.h and undid the changes I made, but this error persists. How can I fix it?

I fixed this by following @Thilo's suggestion of using touch to change the "UIDevice.h"'s access and modification date to the date of the other files in the directory. Since the modification date of all the other files was "July 26, 2013 6:26 PM", I just ran this command in Terminal:

touch -t '201307261826' UIDevice.h

And now my code works fine.

Just delete folder "/Users/MyName/Library/Developer/Xcode/DerivedData/ModuleCache/1EK79MZFJ723Q/", clean & build. works for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM