我有一个使用Cocoapods管理少量依赖项的项目。我可以从Xcode构建它,但是当我尝试使用xctool或travisci构建它时,我会得到一个错误:
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来使用它。
发布于 2016-01-11 17:07:34
@Campbell_Souped的答案对于只支持tvOS的项目非常有用,但是如果您也尝试为OS构建,您将得到一个不支持Bitcode的错误。此版本在启用Bitcode之前检查平台:
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发布于 2016-01-03 04:54:01
尝试将下面的片段添加到Podfile的底部,然后执行pod install
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
endhttps://stackoverflow.com/questions/34557554
复制相似问题