When you create a project in Xcode5, the system automatically creates a PCH (precompile Prefix header) file with the name of the project, which you can use to include a widely used header file and a macro in the development process. The compiler will automatically add the header files in the PCH file to all the source files, so that the contents of the header file can be directly used without using import when the relevant class needs to be used, to a great extent to the programmer's convenience of programming. However, the Precompile Prefix header file is removed 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 process of development can minimize the use of PCH files, if you want to use also to minimize the contents of the PCH file, reduce the program to PCH file dependency. Reference from: http://blog.csdn.net/jymn_chen/article/details/39314163 to: http://blog.csdn.net/tmweipan/article/details/39761843
Xcode6 importing. pch files (precompile Prefix Header)