【发布时间】:2014-09-24 16:23:59
【问题描述】:
将 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 添加其他内容才能正确链接?
【问题讨论】:
标签: ios xctest cocoalumberjack