How to stop huge Prefix.pch.gch file from being copied into application bundle

前端 未结 5 472
醉梦人生
醉梦人生 2021-01-19 10:30

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 Re

5条回答
  •  無奈伤痛
    2021-01-19 10:44

    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.

    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.

提交回复
热议问题