首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用xctool依赖关系构建tvOS应用程序

无法使用xctool依赖关系构建tvOS应用程序
EN

Stack Overflow用户
提问于 2016-01-01 15:45:17
回答 2查看 253关注 0票数 1

我有一个使用Cocoapods管理少量依赖项的项目。我可以从Xcode构建它,但是当我尝试使用xctool或travisci构建它时,我会得到一个错误:

代码语言:javascript
复制
  xcodebuild clean VideoStationViewer
  Pods / SwiftyJSON (Debug)
     ✗ Check dependencies (37 ms)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Check dependencies
    target 'SwiftyJSON' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  1 errored, 0 warning (38 ms)

  Pods / Alamofire (Debug)
    ✗ Check dependencies (38 ms)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Check dependencies
    target 'Alamofire' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  1 errored, 0 warning (38 ms)

  Pods / OHHTTPStubs (Debug)
    ✗ Check dependencies (40 ms)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  Check dependencies
    target 'OHHTTPStubs' has bitcode disabled (ENABLE_BITCODE = NO), but it is required for the 'appletvos' platform
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  1 errored, 0 warning (47 ms)

我猜想xctool使用与Xcode不同的参数来构建,但不确定有什么不同,或者如何告诉xctool使用这些设置,然后如何配置Travisci来使用它。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-01-11 17:07:34

@Campbell_Souped的答案对于只支持tvOS的项目非常有用,但是如果您也尝试为OS构建,您将得到一个不支持Bitcode的错误。此版本在启用Bitcode之前检查平台:

代码语言:javascript
复制
post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.platform_name == :tvos || target.platform_name == :watchos then
      target.build_configurations.each do |config|
          config.build_settings['ENABLE_BITCODE'] = 'YES'
      end
    end
  end
end
票数 1
EN

Stack Overflow用户

发布于 2016-01-03 04:54:01

尝试将下面的片段添加到Podfile的底部,然后执行pod install

代码语言:javascript
复制
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'YES'
    end
  end
end
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34557554

复制
相关文章

相似问题

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