如何阻止巨大的Prefix.pch.gch文件被复制到应用程序包 [英] How to stop huge Prefix.pch.gch file from being copied into application bundle

查看:373
本文介绍了如何阻止巨大的Prefix.pch.gch文件被复制到应用程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,XCode决定在构建时将大量的Prefix.pch.gch文件复制到应用程序的资源文件夹中。此文件不在复制捆绑资源构建阶段,也不能找到任何其他项目设置,应告诉XCode这样做。有没有人看过这个,知道发生了什么?

For some reason, XCode has decided to start copying a huge Prefix.pch.gch file into my application's resources folder when building. This file is not in the Copy Bundle Resources build phase, nor can I find any other project setting that should tell XCode to do this. Has anyone seen this before and know what's going on?

推荐答案

我今天遇到了相同的症状,这是由于我的一个目标C文件包含在目标的复制捆绑资源文件阶段(由于拖放事故,或xcodeproj文件在某些​​时候损坏)。 GCC然后有帮助地包括目标中的前缀头的预编译头,因为存在源文件的依赖。

I had a problem with the same symptoms today, it turned out that it was due to one of my objective C files being included in the Copy Bundle Resources files phase of the target (either due to a drag and drop accident, or the xcodeproj file getting corrupted at some point). GCC was then helpfully including the precompiled headers for the prefix header in the target as there is a dependency from the source file.

在有问题的源文件上执行获取信息并没有显示文件信息对话框中的所有选项卡,即使文件类型设置为sourcecode.c。 objc。

Doing a Get Info on the source file in question didn't show all the tabs on the file info dialog, even though the file type was set to sourcecode.c.objc.

从项目中删除文件并重新添加它可以解决问题。

Removing the file from the project and re-adding it cured the problem.

这篇关于如何阻止巨大的Prefix.pch.gch文件被复制到应用程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆