After modifying system headers, please delete the module cache

Source: Internet
Author: User

 

5 down votefavorite2

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 builtnote: 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 cocould 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?

IOS xcode
Share | improve this question Edited Sep 25 '13 at 3: 41 Kevin
22.4k62559
Asked Sep 25 '13 at 3: 39 mskw
1, 34411124
 
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
 
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
 
I have wondered about how you wocould 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
 
Got to uifontdescriptor. h and undo the changes.-vinodh Sep 25' 13
Add a comment
4 answersactiveoldestvotes
Up vote24down 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 Answered Jan 13 at 11: 19 trieukhang
44556
 
 
I went to the following folder [SHIFT + Cmnd + G] and searchedUIKit.pcmAnd 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
Add a comment
Up vote4down vote

I fixed this by deleting the entire contents of the modulecache Folder:

cd ~/Library/Developer/Xcode/DerivedData/ModuleCache/rm -rf ./*
Share | improve this answer Edited Apr 17 at 20: 05 simonbs
2,22981
Answered Jan 13 at 21: 16 Jamie Forrest
2,1311338
 
1  
This removed all of my project data from desktop... everything... damn-divyu Mar 20
1  
You probably didn't CD into the proper directory. Make sure you replace the 'you' with your Mac OS username.-Jamie Forrest Mar 20
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
Add a comment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.