将 CocoaLumberJack 与 XCTest 一起使用时,我收到一个错误,它无法找到DDLog.h
. 我试过把它<CocoaLumberjack/DDLog.h>
改成没有运气。LumberJack 在 iOS 模拟器中工作时,该项目编译并运行良好,但是当我为单元测试目标运行它时,我收到此错误(请参阅屏幕截图)。
这是我的 -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
.
为什么在运行 TestCases 时 LumberJack 不能正确链接?我还需要向 TestTarget 添加其他内容以使其正确链接吗?