ios 自构建预编译头文件以来,文件已被修改

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19391768/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 02:21:25  来源:igfitidea点击:

file has been modified since the precompiled header was built

iosiphoneobjective-cxcode

提问by Mark

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/FUW5IOHP9BISfolder with no success.

所以我不小心修改了一个标题(CBCentralManager.h)并导致我在构建时显示上述错误。我搜索了堆栈溢出的解决方案,并找到了这个。即使删​​除派生数据后,我仍然得到同样的错误。我也尝试过删除ModuleCache/FUW5IOHP9BIS文件夹没有成功。

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

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.

任何帮助是极大的赞赏。

回答by Gagan_iOS

I faced this issue on OS10.10 with Xcode 6. I resolved issue by removing .pcm files.

我在 Xcode 6 的 OS10.10 上遇到了这个问题。我通过删除 .pcm 文件解决了这个问题。

To delete press 'shift+command+g' & delete all .pcm files or goto the folder ~/Library/Developer/Xcode/DerivedData/ModuleCache/ & delete all .pcm files.

要删除按“shift+command+g”并删除所有 .pcm 文件或转到文件夹 ~/Library/Developer/Xcode/DerivedData/ModuleCache/ 并删除所有 .pcm 文件。

Perform deep clean by pressing 'shift+alt+command+k.

按“shift+alt+command+k”执行深度清洁。

Hope it will work for you.

希望它对你有用。

回答by Philip McDermott

Deleting ~/Library/Developer/Xcode and restarting Xcode fixed this for me (Xcode 6 B7). Suspect an aggressive caching bug.

删除 ~/Library/Developer/Xcode 并重新启动 Xcode 为我解决了这个问题(Xcode 6 B7)。怀疑有侵略性的缓存错误。

No amount of cleaning / build folder cleaning / derived data deleting helped before that.

在此之前,没有多少清理/构建文件夹清理/派生数据删除有帮助。

回答by khanghoang

Remove the pcm file

删除 pcm 文件

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

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

then

然后

Clean Project( Cmd+Shift+K)

清理项目(Cmd+Shift+K)

Problem solved

问题解决了

回答by Duncan C

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

只需从项目菜单中选择干净。这应该强制完全重建并解决rproblem。

回答by bunz4u

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]"

尝试转到您的管理器 -> 项目,您将看到导出数据的保存路径。我的看起来像“~/Library/Developer/Xcode/DerivedData/[项目名称]-[mumbo jump]”

Delete the "[Project name]-[mumbo jump]" folder, and you should be all good.

删除“[项目名称]-[mumbo jump]”文件夹,应该就一切正常了。

回答by KepPM

Deep clean (Cmd + Opt + Shft + K), clearing folder DerivedData, clearing simulator, restarting Xcode and mac doesn't work for me.

深度清理(Cmd + Opt + Shft + K)、清除文件夹 DerivedData、清除模拟器、重新启动 Xcode 和 mac 对我不起作用。

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.

仅在更改 pch-file(添加空格或注释/取消注释某些代码)后才修复问题。Xcode 在构建阶段错误地缓存了文件。更改此文件修复了问题。

回答by Laith

Manually deleting the DerivedData folder fixed it for me.

手动删除 DerivedData 文件夹为我修复了它。

回答by Mark

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

因此,解决此问题的唯一方法似乎是卸载 Xcode 并重新下载。这解决了我的问题。

回答by satyso

quit xcode and reopen it .This fixed my problem.

退出 xcode 并重新打开它。这解决了我的问题。

回答by Manisha

I was facing this issue. Deleting moduleCache and restarting Xcode & Mac did not help me to resolve the issue.

我正面临这个问题。删除 moduleCache 并重新启动 Xcode & Mac 并没有帮助我解决问题。

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.

对我有用的解决方案:我在 Finder-> 转到文件夹中复制了路径“/private/var/folders/5s/1q3qz48j6zxc028txvdyqhwr000btt/C/org.llvm.clang/ModuleCache”,删除了该 ModuleCache 中的所有文件夹。

Now I am able to build successfully.

现在我能够成功构建。