IOS PCH Add-on

Source: Internet
Author: User

The previous PCH for iOS was the system's own, and then Apple canceled the PCH, and I've been disgusted with the addition. I don't know if my brain is smoking recently. It was added. Do not like to add, because I want their code sent to others, other people can run anywhere, without changing the wrong warning.

Reflection of a bit, because a lot of people are added, online blog also have a variety of how to add, but there is no analysis of why plus, just give the method of adding. In particular, to do the procedures, we must know why to do so, can not be confused. Can be temporarily regardless, late must be tube. Because each step of the code is to represent the interest.

The benefits of PCH

1. Easy to re-add library

2. Header files

3. Public Documents

4. Name (name of the notice.

[Nsuserdefaults Standarduserdefaults] Key

Third-party key, and ID


4. Global variables. Color Font size, line, etc.)

Output of 5.log (Debug,release)

6. Macro (width of the screen, height of the navigation bar, these, etc.)

These are usually placed in the PCH header file.


Cons: 1. Since Apple has removed him. There must be something bad about him.

2. The efficiency of compiling is consumed. Every load must be loaded, it is sure to consume the efficiency of the operation, but very small, the general eye can hardly tell

3. Send to others, easy to find the address, each time you have to configure

4. In the header file, easy to confuse. Some pages use, do not know why can call this method, obviously did not declare themselves. But can be called. Easily misleading

5. Each time you create a new project, you have to manually add

6. There must be something else. That's when they meet.


This article is from the "snowflakes flying over the World" blog, please be sure to keep this source http://smengxiang.blog.51cto.com/11204872/1888172

IOS PCH Add-on

Related Article

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.