與XCTest一起使用CocoaLumberJack時,出現無法找到DDLog.h
的錯誤。我試過把它改爲<CocoaLumberjack/DDLog.h>
,但沒有運氣。該項目在iOS模擬器中工作的LumberJack編譯並運行良好,但是當我爲單元測試目標運行它時,出現此錯誤(請參閱屏幕截圖)。CocoaLumberJack XCTest鏈接器運行測試用例時出錯
這裏是我的-Prefix.pch
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#import <CocoaLumberjack/DDLog.h>
#import "Utilities.h"
#endif
#ifdef DEBUG
static const int ddLogLevel = LOG_LEVEL_VERBOSE;
#else
static const int ddLogLevel = LOG_LEVEL_ERROR;
#endif
錯誤:
我鏈接的庫向tests
目標也爲與libPods.a
如下圖所示。
爲什麼不樵夫鏈接正常運行的TestCase的時候?還有什麼我需要添加到TestTarget爲它正確鏈接?