【发布时间】:2013-04-15 06:31:41
【问题描述】:
我有一个使用 Apple 提供的 UnitTest 模板的项目设置。我也将 MagicalRecord 添加到前缀标题中。当我在设备和模拟器上运行时,一切正常。
除了单元测试,当我为单元测试编译时,构建失败并使用以下命令:'CoreData+MagicalRecord.h' file not found。这发生在前缀标头中。
前缀.pch
//
// Prefix header for all source files of the '123tv' target in the '123tv' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "Environments.h"
#import "CoreData+MagicalRecord.h"
#import "PBLog.h"
#endif
有人有想法吗?
【问题讨论】:
-
是否为测试目标正确设置了
Header Search Paths? -
不,他们不是。有没有办法自动化这个?添加您的评论作为答案,我会将其标记为正确。
标签: objective-c xcode unit-testing magicalrecord cocoapods