How do I code one import statement that the entire App recognises
I remember reading somewhere but I cannot remember where exactly I need to write the import statement so that the whole App has access to it. I have a AppHelper class which I want the whole app to see without importing it in every class file.
So I have tried to add it to my .pch file but I get the following error messages:
"_kGTMHTTPFetcherStatusDomain", referenced from: _kGTMHTTPFetcherStatusDomain$non_lazy_ptr in GTMHTTPFetcher.o (maybe you meant: _kGTMHTTPFetcherStatusDomain$non_lazy_ptr) "_kGTMHTTPFetcherRetryDelayStartedNotification", referenced from: _kGTMHTTPFetcherRetryDelayStartedNotification$non_lazy_ptr in GTMHTTPFetcher.o (maybe you meant: _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 an开发者_StackOverflow中文版d later."
#endif
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
#import "AppCache.h"
You can add that import into application precompiled header (e.g. YourApplication.pch)
精彩评论