AFNetworking Cause Error while using XCTest in Xcode5

醉酒当歌 提交于 2019-12-09 11:20:37

问题


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??


回答1:


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




回答2:


CocoaPods's wiki: multiple-targets may give you some advices.

Change your podfile ,and run "pod install" again!



来源:https://stackoverflow.com/questions/19994720/afnetworking-cause-error-while-using-xctest-in-xcode5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!