问题
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