微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在 podfile 中指定自动启用 UITests 目标

如何解决如何在 podfile 中指定自动启用 UITests 目标

我在 xcode 中自动创建了一个带有测试的目标,但认情况下它是禁用的,因为我可以通过 podfile 指定自动启用目标

PODFILE

if IS_UITESTING_ENABLED
      target.build_configurations.each do |config|
if target.name == "iOSAutoTests-UI-Tests"
      config.build_settings['TEST_TARGET_NAME'] = "APP"
end
end
end
end

PODSPEC

s.ios.deployment_target = '10.3'

  s.source_files = 'iOSAutoTests/Classes/**/*'

  s.test_spec "Tests" do |ts|
    ts.source_files = "iOSAutoTests/Tests/**/*.swift"
    ts.test_type = :ui
    ts.requires_app_host = true
  end

enter image description here

我不需要像“在 Xcode 中用手打开它”这样的解决方案。我需要 podfile 或 podspec 中的解决方

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。