Xcode6 Add. pch

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.