Magic Studio

专心做有逼格的APP!

after modifying system headers, please delete the module cache at

 

I don't know how I modified a iOS SDK file, but Xcode say I did. Here is what they reported.

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

I tried to look for this DerivedData but could not. I also went into organizer to delete it and did a clean, even after that, no luck.

How do I restore this UIFontDescriptor.h to its original form?

share|improve this question
 
1  
UPdate: I went into the MOduleCache and deleted EVERYTHING, then re-cleaned again, and now it will compile in simulator. –  mskw Sep 25 '13 at 3:40
    
Yeah the modules thing isn't fully ironed out yet - you can disable it in the project settings if it becomes a major issue. –  Richard J. Ross III Sep 25 '13 at 3:43
    
I have wondered about how you would fix this too. But maybe more importantly, why are you allowed to modify header files from the SDK? Didn't use to be able to modify these files in the old days. –  Jim MerkelSep 25 '13 at 3:46
    
got to UIFontDescriptor.h and undo the changes . –  Vinodh Sep 25 '13 at 8:49

4 Answers

Remove the pcm file

rm "/Users/m/Library/Developer/Xcode/DerivedData/ModuleCache/24CDWDK5BTYJE/UIKit.pcm"

then

Clean Project( Cmd+Shift+K)

Problem solved

share|improve this answer
 
    
I went to the following folder [Shift+Cmnd+G] and searched for UIKit.pcm and deleted all of them! /Users/USERNAME/Library/Developer/Xcode/DerivedData/ModuleCache/. Thanks for answer, this works best guys! –  emotality Jul 31 at 2:51
    
Awesome answer. +1 –  TrueLifeCoder Aug 2 at 5:49

I fixed this by deleting the entire contents of the ModuleCache folder:

cd ~/Library/Developer/Xcode/DerivedData/ModuleCache/
rm -rf ./*
share|improve this answer
 
1  
this removed all of my project data from desktop.. everything.. damn –  Divyu Mar 20 at 15:29
1  
You probably didn't cd into the proper directory. Make sure you replace the 'you' above with your Mac OS username. –  Jamie Forrest Mar 20 at 19:27
1  
Your answer is potentially danger. Can you fix it? Like this: cd ~/Library/Developer/Xcode/DerivedData/ModuleCache/ && rm -rf ./* or like this: rm -rf ~/Library/Developer/Xcode/DerivedData/ModuleCache/* –  k06a Apr 17 at 18:36
    
@JamieForrest You are my hero –  kl94 Aug 7 at 21:04

posted on 2014-08-21 17:07  Mr 布鲁斯  阅读(734)  评论(0编辑  收藏  举报

导航