Reputation: 804
I was running my application without any problems on both the simulator and device. All of a sudden i get this error:
fatal error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionView.h' has been modified since the precompiled header '/Users/rashidasgari/Library/Developer/Xcode/DerivedData/ModuleCache/SWBH8ZAWBXAH/UIKit.pcm' was built
note: after modifying system headers, please delete the module cache at '/Users/rashidasgari/Library/Developer/Xcode/DerivedData/ModuleCache/SWBH8ZAWBXAH'
I tried any solution i could find and still no luck. Note that i tried running the application on another MacBook and everything works fine without any errors.
Upvotes: 4
Views: 9246
Reputation: 1263
I solved this problem by changing DerivedData folder name..see how i did
Xcode->preferences->Then you will be redirected to preferences screen
Then click on locations tab under menu selection->then you will have options like Derived data,snap shots ,archives
under Derived data you can see some thing like /Users/SENABI/Library/Developer/Xcode/DerivedData-> then click on that arrow button that's it there you can see DerivedData folder click on that and rename it. your error will be removed. This is my experience and it worked for me hope it will be helpful to someone.
Upvotes: 2
Reputation: 1
you don't have to delete anything. you messed up a git pull somewhere probably. just quit Xcode and the simulator, reset any changes (or stash them) try another git pull, start Xcode again, clean your project and run it again.
Upvotes: 0
Reputation: 802
Error occurs when system header files are modified.
Solution :
Upvotes: 1
Reputation: 38142
Use CMD+Shift+K to clean the build and then relaunch. This should solve the issue.
Upvotes: 0
Reputation: 804
Ok after trying almost every solution on web, i decided to reinstall xcode and it finally worked.
Upvotes: 2
Reputation: 119021
Cleaning the project is the first port of call (menu under Product
).
If that doesn't help, delete the derived data. That can be done via the Locations
section of the preferences or by navigating to the directory in Finder and deleting it (there is a little ->
button in preferences to get there, or use Go To Folder...
option in the Finder.
Upvotes: 24