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

up vote 24down voteaccepted

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
欢迎加群互相学习,共同进步。QQ群:iOS: 58099570 | Android: 572064792 | Nodejs:329118122 做人要厚道,转载请注明出处!
















本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/sunshine-anycall/p/3927626.html ,如需转载请自行联系原作者

相关文章
|
9月前
|
SQL IDE Java
hibernate5 Cannot create TypedQuery for query with more than one return using requested result type
hibernate5 Cannot create TypedQuery for query with more than one return using requested result type
91 0
|
XML SQL 数据库
Error getting generated key or setting result to parameter object.必须执行该语句才能获得结果。
Error getting generated key or setting result to parameter object.必须执行该语句才能获得结果。
2839 47
ValidationError: Invalid options object. Dev Server has been initialized using an options object tha
ValidationError: Invalid options object. Dev Server has been initialized using an options object tha