How to encode one import statement that recognizes the entire application

I remember reading somewhere, but I can’t remember exactly where I need to write the import statement so that the entire application has access to it. I have an AppHelper class that I want the entire application to see without importing it into each class file.

So, I tried adding it to my .pch file, but I get the following error messages:

"_ KGTMHTTPFetcherStatusDomain", referenced from: _kGTMHTTPFetcherStatusDomain $ non_lazy_ptr in GTMHTTPFetcher.o (perhaps you mean: _kGTMHTTPFetcherStatusDomain $ non_lazy_ptr) "_kGTMHTTPFetcherRetryDelayStartedNotification", referenced from: _kGTMHTTPFetcherRetryDelayStartedNotification $ non_lazy_ptr in GTMHTTPFetcher.o (perhaps you mean : _kGTMHTTPFetcherRetryDelayStartedNotification $ non_lazy_ptr)

This is my .pcb file:

// // Prefix header for all source files of the 'SplitView' target in the 'SplitView' project // #import <Availability.h> #ifndef __IPHONE_3_2 #warning "This project uses features only available in iPhone SDK 3.2 and later." #endif #ifdef __OBJC__ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #endif #import "AppCache.h" 
+4
source share
1 answer

You can add this import to the header of the precompiled application (e.g. YourApplication.pch)

+4
source

All Articles