file has been modified since the precompiled header was built

后端 未结 13 1883
鱼传尺愫
鱼传尺愫 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:10

    Remove the pcm file

    rm "/var/folders/pj/hslm53_51xxd_npfqym5r6z00000gn/C/com.apple.DeveloperTools/5.0-5A1412/Xcode/5.0-5A1412/Xcode/ModuleCache/FUW5IOHP9BIS/CoreBluetooth.pcm"

    then

    Clean Project( Cmd+Shift+K)

    Problem solved

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

    Manually deleting the DerivedData folder fixed it for me.

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

    Nothing above works for me, even uninstalling Xcode. Finally, I tried copying the modified file from other project to my current project, this worked.

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

    Just select clean from the project menu. That should force a complete rebuild and solve the rproblem.

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

    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.

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

    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.

    0 讨论(0)
提交回复
热议问题