Importance of the <ApplicationName> _prefix.pch File

What is the importance of the importance of _prefix.pch file?

+5
source share
1 answer

Conceptually, it is included at the beginning of each translation unit (i.e., each compiled C, C ++, Objective-C, or Objective-C ++ file). Therefore, you can make each file in your project include a specific macro by adding this to your .pch file:

#if !defined(MY_MACRO)
    #define MY_MACRO (12345)
#endif /* !defined(MY_MACRO) */

And then MY_MACROit is always available. It is also commonly used to import frame headers, so you do not need to run input #import <Foundation/Foundation.h>in each file.

+7
source

All Articles