When you create a project in Xcode5, the system automatically creates a PCH file with the name of the project, but removes the precompile Prefix header file from the Xcode6. The main reason Xcode6 removed precompile Prefix header might be that the Prefix header greatly increased the build time. Without the prefix header, manual @import will be manually imported to the header file, losing programming convenience while reducing the build time.
How do I manually add the precompile Prefix Header in Xcode6?
(1) In the project to add a PCH file, the name can continue to follow the XCODE5 "project name-prefix.pch":
(2) Modify the project configuration file, add the path of the PCH file you created to the Precompile header option in building setting (Path Add "$ (srcroot)/project name/PCH filename"):
This completes the manual add PCH file, compile the program, if there is an error check the correct path is added.
Note here that the compile and import mechanism of the PCH is very different when the switch precompile Prefix header:
(1) If the Precompile Prefix header is yes, the PCH will be precompiled and the precompiled PCH file will be cached to improve the compilation speed. (2) If the Precompile Prefix header is no, then the PCH is not precompiled, but is compiled once in each of the. m files used in the Frame class library it imports, reducing compilation speed.
Summary: Since Apple in the Xcode6 removed the precompile Prefix header file, in the development process can be as few as possible to use PCH files, if you want to use also to minimize the contents of the PCH file, reduce the program to PCH file dependency
Xcode6 Add. pch