我记得在某个地方读过,但我记不清我需要在哪里写导入语句,这样整个应用程序就可以访问它。我有一个AppHelper类,我希望整个应用程序都能看到,而不必在每个类文件中导入它。
因此,我尝试将其添加到.pch文件中,但收到以下错误消息:
“_kgtmhttpfetcherstatusDomain”,引用自:_kgtmhttpfetcherstatusDomain$non_lazy_ptr in gtmhtpfetcher.o(也许您的意思是:_kgtmhttpfetcherstatusDomain$non_lazy_ptr)”中的“_kgtmhttpfetcherrydelaystartednotification”,引用自:_kgtmhttpfetcherrydelaystartednotification$non_lazy_ptr in”gtmhttpfetcher.o(也许你的意思是:_kgtmhttpfetcherrydelaystartednotification$non_lazy_ptr)
这是我的.pcb文件:
#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"