xcode CocoaPods 仅依赖于调试/发布构建
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19610551/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
CocoaPods dependency only on debug/release build
提问by KrauseFx
I'm using a pod as an internal library for my project.
我使用 pod 作为我的项目的内部库。
I want to have some pods included only on release/debug builds, like Reveal/Sparkinspector.
我想让一些 pod 只包含在发布/调试版本中,比如 Reveal/Sparkinspector。
Is there any way to define podspec
dependencies depending on the currently selected build configuration (build/release)?
有没有办法podspec
根据当前选择的构建配置(构建/发布)定义依赖项?
回答by KrauseFx
With the recent release it's officially available now: http://blog.cocoapods.org/CocoaPods-0.34/
随着最近的发布,它现在正式可用:http: //blog.cocoapods.org/CocoaPods-0.34/
Use
用
pod 'Lookback', :configurations => ['Debug']
回答by Matt S.
For anyone just finding this, this looks to be scheduled in the next release, per my answer here:
对于刚刚发现此问题的任何人,根据我在此处的回答,这似乎会安排在下一个版本中:
回答by wattson12
see the multiple targets section here: https://github.com/CocoaPods/CocoaPods/wiki/A-Podfile
在此处查看多目标部分:https: //github.com/CocoaPods/CocoaPods/wiki/A-Podfile
e.g.
例如
target :debug do
pod 'TestFlight'
end