AFNetworking原因在Xcode5中使用XCTest时出错 [英] AFNetworking Cause Error while using XCTest in Xcode5
问题描述
我使用Xcode 5,现在刚刚开始对我现有的项目进行单元测试,因为我添加了 CocoaTouch单元测试包
作为目标(目标名称是:MyAppTests )到我的项目。我以前添加AFNetworking库使用 CocoaPods
,而我正在运行测试案例我得到错误AFNetworking.h文件未找到。
我在测试中添加了AFNetworking.h,但问题直到保持。是否有任何额外的设置将Pods包含到我的测试目标
I am using Xcode 5 and now just started unit testing on my existing project, for that I added the CocoaTouch Unit Testing Bundle
as a target (Target Name is : MyAppTests) to my project.I was previously added AFNetworking library using CocoaPods
,while I am running the test Case I got the error AFNetworking.h file not found.
I added AFNetworking.h in the Tests.m but issue till remains. Is there any additional setting s for including the Pods to my testing target??
推荐答案
code> ,然后选择
配置
,选择下拉菜单 Debug code>。从该列表中选择您的测试目标,并将
配置集
选项卡中的无更改为Pod。
在发布
中也做同样
Got the solution finally.
select info
of the project then select Configuration
select the dropdown Debug
. From that list select your test target and change the None in Configurations Set
Tab into Pods.
Do the same in Release
Tab also
这篇关于AFNetworking原因在Xcode5中使用XCTest时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!