2014-12-05 24 views
1

我正在爲應用程序編寫幾個XCTests。當我剛開始編輯AppTests.m,我得到一個錯誤說,它不能找到ZeroPush(這是在AppDelegate.h):創建一個簡單的XCTestCase,找不到ZeroPush.h,它被安裝爲一個CocoaPod

Lexical or Preprocessor Issue 
/Users/jt/repos/clients/App/App/AppDelegate.h:10:9: 'ZeroPush.h' file not found 

但通常編譯我的應用程序時,它能夠找到它。在我的ViewController中,它能夠找到AFNetworking。我將如何解決這個問題?

我AppTests.m

#import <XCTest/XCTest.h> 
#import "AppDelegate.h" // <- this imports ZeroPush.h 
#import "ViewController.h" 

@interface AocWineBarTests : XCTestCase{ 
@private 
    UIApplication  *app; 
    ViewController *viewController; 
    AppDelegate  *appDelegate; 
    //CalcViewController *calcViewController; 
    //NSView    *calcView; 
} 

@end 

回答

1

在你的應用程序代理,更改:

#import "ZeroPush.h" 

#import <ZeroPush/ZeroPush.h> 

我做一個假設,即它在文件夾命名爲ZeroPush。將文件夾路徑更改爲實際路徑所需的路徑。

+0

thx for answer。嗯......很奇怪,所以當我做出改變時,我仍然得到相同的錯誤(但能夠編譯)。路徑似乎是'Pods/ZeroPush/ZeroPush-iOS/ZeroPush.h',但包括那將不會編譯。 – timpone 2014-12-05 14:36:00