【问题标题】:AFNetworking Cause Error while using XCTest in Xcode5在 Xcode5 中使用 XCTest 时 AFNetworking 导致错误
【发布时间】:2013-11-28 11:18:00
【问题描述】:

我正在使用 Xcode 5,现在刚刚开始对现有项目进行单元测试,为此我将 CocoaTouch Unit Testing Bundle 作为目标(目标名称为:MyAppTests)添加到我的项目中。我之前使用 @987654322 添加了 AFNetworking 库@,当我运行测试用例时,我收到错误 AFNetworking.h 文件未找到。 我在 Tests.m 中添加了 AFNetworking.h,但问题仍然存在。是否有任何其他设置可以将 Pod 包含到我的测试目标中??

【问题讨论】:

    标签: ios iphone xcode cocoa-touch xctest


    【解决方案1】:

    终于解决了。 选择项目的info 然后选择Configuration 选择下拉列表Debug。从该列表中选择您的测试目标并将Configurations Set 选项卡中的无更改为 Pod。 在Release 选项卡中也这样做

    【讨论】:

      【解决方案2】:

      CocoaPods 的 wiki:multiple-targets 可能会给你一些建议。

      更改您的 podfile,然后再次运行“pod install”!

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-04-05
        • 2013-10-08
        • 1970-01-01
        • 2014-12-21
        • 1970-01-01
        • 1970-01-01
        • 2014-09-12
        • 2014-05-12
        相关资源
        最近更新 更多