views:

71

answers:

1

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 and later."
#endif


#ifdef __OBJC__
    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>

#endif

#import "AppCache.h"
+4  A: 

You can add that import into application precompiled header (e.g. YourApplication.pch)

Vladimir
I tried that but as soon as I put it in the .pch file i get this: "_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)
TheLearner
When I remove it, the App compiles with zero errors?
TheLearner
try to clean your target and rebuild it
Vladimir
No doesn't work
TheLearner
Update your question to show what you're putting in your .pch file.
Dan Ray