18

Checked all of the question shown in image but nothing works out. enter image description here

In xcode 5 I m getting this issue

fatal error: file '/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h' has been modified since the precompiled header '/Users/administrator/Library/Developer/Xcode/DerivedData/ModuleCache/220IXKWL5NEDF/UIKit.pcm' was built note: after modifying system headers, please delete the module cache at '/Users/administrator/Library/Developer/Xcode/DerivedData/ModuleCache/220IXKWL5NEDF' 1 error generated.

What could be the issue??? Any help ld be greatly appreciated.

2
  • KepPm gives best and simplest solution for this problem. Please review that. Commented Sep 18, 2014 at 14:45
  • I got this problem solved with the last update on master channel Commented Mar 10, 2020 at 2:21

5 Answers 5

40
  1. Delete DerivedData at /Library/Developer/Xcode/DerivedData/
  2. Reset your simulator

Quit xcode and then it runs again.

Sign up to request clarification or add additional context in comments.

8 Comments

Thank ChandreshKanetiya you are the MAN! If I Had a Double vote I'd Give it to you :-) Also, My Xcode/DerivedData folder was in another Location, just worth Mentioning ;-)
wasted time on this issue. Thanks for pointing out this simple fix man.
Worked great! Thanks. One change though. The derived data directory is at ~/Library/Developer/Xcode/DerivedData/
You only need to delete the DerivedData/ModuleCache folder.
You only need to delete the DerivedData/ModuleCache/YOUR_PROJECT_CACHE folder.
|
14

Deep clean (Cmd + Opt + Shft + K), clearing folder DerivedData, clearing simulator, restarting Xcode and mac doesn't work for me.

Problem was fixed only after changing pch-file (adding a whitespace or comment/uncomment some code). File was incorrectly cached on build phase by Xcode. Changing this file fixed problem.

2 Comments

This worked for me, the file was under source called 'myappname-Prefix.pch'
Can you be a little more specific on the file paht? I can't find it.
5

It is a very common problem if you are dealing with library development.I would suggest you to set Precompile Prefix Header to NO. Nothing worked for me except this.

2 Comments

Can you please detail where to find this setting?
Click on the Project in XCode file tree -> Targets -> your app -> Build Settings -> search for GCC_PRECOMPILE_PREFIX_HEADER
1

If above not worked try delete precompiled header folders in /var/folders/d4/pz....00gq/C/com.apple.DeveloperTools/6.0.1-6A317/Xcode/SharedPrecompiledHeaders/your app change the path according to your machine and find the precompiled header folders then delete and run again.

Comments

1

If the other mentioned solutions don't work for you, here's what works for me.

  1. Go to the folder that contains the mentioned simulator in the error message. In my case it was: Xcode > Contents > Developer > Platforms > iPhoneSimulator.platform > Developer > SDKs Then delete the simulator/s in that folder.

  2. Go to Xcodes preferences > downloads > and hit "check and install" to get your simulators back.

  3. Do a clean, and delete derived data.

I found that this error occurs mostly when I'm working in interface builder and have the assistant editor set to automatic. Sometimes the auto file will be something like NSObject, and if you accidentally edit that, you will get this error.

Alternatively, if you have time machine set up, you can restore the offending file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.