What is the importance of importance of _prefix.pch file?
Prefix. pch is a precompiled header. Precompiled headers were invented to make compiling faster. Rather than parsing the same header files over and over, these files get parsed once, ahead of time.
From your Xcode menu, select File > New > File... From iOS template options, select Other > PCH file. Name the file <target_name>-Prefix. pch, and then select Create.
Conceptually, it's included at the top of every translation unit (i.e. every compiled C, C++, Objective-C, or Objective-C++ file.) So you can force every file in your project to include a particular macro by adding this to your .pch file:
#if !defined(MY_MACRO)
#define MY_MACRO (12345)
#endif /* !defined(MY_MACRO) */
And then MY_MACRO
is always available. It's also commonly used to import framework headers so you don't have to run around typing #import <Foundation/Foundation.h>
in every file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With