file has been modified since the precompiled header was built

后端 未结 13 1884
鱼传尺愫
鱼传尺愫 2020-12-23 09:49

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

相关标签:
13条回答
  • 2020-12-23 10:23

    quit xcode and reopen it .This fixed my problem.

    0 讨论(0)
  • 2020-12-23 10:26

    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.

    0 讨论(0)
  • 2020-12-23 10:28

    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.

    0 讨论(0)
  • 2020-12-23 10:31

    So it seems the only way to fix this issue is to uninstall Xcode and download it again. This fixed my problem.

    0 讨论(0)
  • 2020-12-23 10:32

    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.

    0 讨论(0)
  • 2020-12-23 10:35

    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
    
    0 讨论(0)
提交回复
热议问题