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:

  • iOS CGColor versus UIColor
  • Objective-C JSON - Convert JSON object to native object?
  • Customize text color of UIDatePicker for iOS7 (just like Mailbox does)
  • Creating Excel XLS files on iOS
  • How to allow zooming of UIWebView (tried everything)
  • Xcode iOS deployment target check?
  • file /Applications/' has been modified since the precompiled header '/var/folders/pj/hslm53_51xxd_npfqym5r6z00000gn/C/ was built

    Any help is greatly appreciated.

    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)

    Problem solved

    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.