【问题标题】:iOS Tests target cannot access target podsiOS 测试目标无法访问目标 pod
【发布时间】:2016-10-05 14:49:54
【问题描述】:

我为我的应用创建了一个测试目标。它具有类似的依赖项

import XCTest
import RxSwift
import RxCocoa
import RxBlocking
@testable import MyApp

我的 Podfile 看起来像

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

def shared_pods
    pod 'RxSwift',          '~> 2.0'
    pod 'RxCocoa',          '~> 2.0'
end

target 'Mobium-ios' do
    shared_pods
end

target 'Mobium-ios-tests' do
    shared_pods
    pod 'RxBlocking',       '~> 2.0'
    pod 'RxTests',          '~> 2.0'
end

但是,在我的测试中,我无法导入 RxBlocking

【问题讨论】:

    标签: ios unit-testing cocoapods


    【解决方案1】:

    “为测试而构建”解决了这个问题。 ?

    【讨论】:

    • 你能解释一下吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-06
    • 2016-12-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多