file has been modified since the precompiled header was built
So I accidentally modified a header (
CBCentralManager.h) and caused the above error to show when I build. I searched stack overflow for the solution, and found this. Even after deleting the derived data, I still get the same error. I’ve also tried to delete the
ModuleCache/FUW5IOHP9BIS folder with no success.
Here is the specific error I’m seeing:
file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h' has been modified since the precompiled header '/var/folders/pj/hslm53_51xxd_npfqym5r6z00000gn/C/com.apple.DeveloperTools/5.0-5A1412/Xcode/5.0-5A1412/Xcode/ModuleCache/FUW5IOHP9BIS/CoreBluetooth.pcm was built
Any help is greatly appreciated.
- Converting a unix timestamp to NSdate using local timezone
- fwrite(): SSL operation failed with code 1. OpenSSL Error messages:\nerror:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry IN PHP
- Is it mandatory to call NSUserDefaults synchronize method?
- How do I pass data between two scenes in Swift?
- ios AVCaptureVideoPreviewLayer capture current image
- How to run timer thought the app entered background or is terminated
13 Solutions Collect From Internet About “file has been modified since the precompiled header was built”
Deleting ~/Library/Developer/Xcode and restarting Xcode fixed this for me (Xcode 6 B7). Suspect an aggressive caching bug.
No amount of cleaning / build folder cleaning / derived data deleting helped before that.
I faced this issue on OS10.10 with Xcode 6. I resolved issue by removing .pcm files.
To delete press ‘shift+command+g’ & delete all .pcm files or goto the folder ~/Library/Developer/Xcode/DerivedData/ModuleCache/ & delete all .pcm files.
Perform deep clean by pressing ‘shift+alt+command+k.
Hope it will work for you.
Remove the pcm file
Clean Project( Cmd+Shift+K)
Just select clean from the project menu. That should force a complete rebuild and solve the rproblem.
Try going to your Organizer -> Projects, and you’ll see the path for where you’re derived data is saved. Mine looks something like “~/Library/Developer/Xcode/DerivedData/[Project name]-[mumbo jump]”
Delete the “[Project name]-[mumbo jump]” folder, and you should be all good.
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.
So it seems the only way to fix this issue is to uninstall Xcode and download it again. This fixed my problem.
quit xcode and reopen it .This fixed my problem.
Manually deleting the DerivedData folder fixed it for me.
You can also try these, clean and then build again
find /var/folders 2>&1 | grep -v 'Permission denied' | grep '\.pcm' | xargs rm find ~/Library/Developer/Xcode/DerivedData 2>&1 | grep -v 'Permission denied' | grep '\.pcm' | xargs rm
Nothing above works for me, even uninstalling Xcode. Finally, I tried copying the modified file from other project to my current project, this worked.
I was facing this issue. Deleting moduleCache and restarting Xcode & Mac did not help me to resolve the issue.
Solution that worked for me: I copied the path “/private/var/folders/5s/1q3qz48j6zxc028txvdyqhwr000btt/C/org.llvm.clang/ModuleCache” in Finder->Go to folder, deleted all the folders from that ModuleCache.
Now I am able to build successfully.
I tried deleting the precompiled ~/Library/Developer/Xcode and restarting Xcode, plus a few of the other ideas presented here, nothing was working. As it seems to be a multiple-target kind of issue, I found after changing the target to another target, building/uploading the other target successfully, then changing back (after doing the other things) to the target I was looking to build / upload originally, I was finally successful.
- Long press and single click on button
- still dyld: Library not loaded
- Non repeating random numbers
- AFNetworking not resuming download
- How to convert UTC date string to local time (systemTimeZone)
- latitude and longitude points from MKPolyline
- Xcode spell checking
- Playing a sound while app is in the foreground and the screen is locked – iOS
- How to have CMake show headers-that are not part of any binary target-in the IDE?
- UIBarButtonItem in navigation bar programmatically?
- Dismiss view controller from @selector without creating seperate method
- What is most common and correct practice to get a CGFloat from an NSNumber?
- Cost of message dispatch in Objective-C
- What is the Objective-C equivalent for “toString()”, for use with NSLog?
- Getting the location of a PHAsset in Swift