CocoaPods dependency only on debug/release build

跟風遠走 提交于 2019-11-27 12:47:00

问题


I'm using a pod as an internal library for my project.

I want to have some pods included only on release/debug builds, like Reveal/Sparkinspector.

Is there any way to define podspec dependencies depending on the currently selected build configuration (build/release)?


回答1:


With the recent release it's officially available now: http://blog.cocoapods.org/CocoaPods-0.34/

Use

pod 'Lookback', :configurations => ['Debug']



回答2:


For anyone just finding this, this looks to be scheduled in the next release, per my answer here:

https://stackoverflow.com/a/25653469/490180




回答3:


see the multiple targets section here: https://github.com/CocoaPods/CocoaPods/wiki/A-Podfile

e.g.

target :debug do
    pod 'TestFlight'
end


来源:https://stackoverflow.com/questions/19610551/cocoapods-dependency-only-on-debug-release-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!