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
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.
source
share