首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能使用cocoapods在测试目标中导入快速/灵活

未能使用cocoapods在测试目标中导入快速/灵活
EN

Stack Overflow用户
提问于 2018-10-08 10:33:43
回答 1查看 258关注 0票数 0

Problem:突然,我从用Xcode 10创建的项目中的测试目标开始失败,出现了“导入快速找不到模块”的消息。

附加细节:如果我不构建主目标,测试目标将在“FirebaseCore/FirebaseCore Core.h”文件中失败。此外,我还可以看到,只构建测试目标,使项目之前保持干净,不会触发任何依赖项的构建,无论是来自主目标还是测试目标依赖项。

Podfile看起来像这个

代码语言:javascript
复制
ENV['COCOAPODS_DISABLE_STATS'] = "true"
platform :ios, '10.0'

use_frameworks!

target 'MyProject' do
  pod 'Firebase/Core'
  pod 'Crashlytics'
  pod 'Alamofire'
  pod 'KeychainSwift'

  target 'MyProjectTests' do 
    inherit! :search_paths

    pod 'Quick'
    pod 'Nimble'
  end

  target 'MyProjectUITests' do
    inherit! :complete   
  end
end

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          if config.name == 'Debug'
            config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
          end
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        end
    end
end

我如何解决这个问题,并确保测试目标的构建触发了所有依赖项的构建,无论是来自主目标还是其自身的依赖项?

EN

回答 1

Stack Overflow用户

发布于 2018-10-08 10:35:44

溶液

确保"YourTestSchema“->编辑模式-> build ->找到隐式依赖项。

附加详细信息:由于快速根据Xcode 10新的构建系统具有循环依赖性,我打开了这个设置,并且在CI失败之前再也没有想到它。确保你没有犯同样的错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52700383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档