About precompile prefix Header

Source: Internet
Author: User

In xcode Project Properties> build settings, the precompile prefix header is used to identify whether pre-compiled header files are used, and the prefix header is used to identify PCH files.


The content of the prefix. PCH file is as follows:

# Ifdef _ objc __

# Import <Foundation/Foundation. h>

# Import <uikit/uikit. h>

# Endif


Use the _ objc _ macro definition to ensure that files referenced in the macro are referenced only by files written in the objc language.


If the precompile prefix header is yes, PCH will be pre-compiled, and the pre-compiled PCH file will be cached to increase the compilation speed.


If the precompile prefix header is no, PCH will not be precompiled. Instead, it will be compiled once in every. M file of the framework class library that uses it for import.
For example, if the above PCH file references the uikit class library, you do not need to reference it in other SWIFT classes.


Learn about SWIFT technology and join the QQ Group of the SWIFT bookclub: 259152129



About precompile prefix Header

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.