我是cocoapod的新手,我需要使用父项目和子项目正在使用的cocoapod。假设我的父项目是A,它有子项目b,我想为项目A安装cocoapod,并为子项目b使用相同的cocoapod,有其他方法可以这样做吗?不能更改项目结构。它必须是项目A和子项目b。
获取项目A的所有pod
target 'A' do
pod 'lalala'
target 'B' do
inherit! :search_paths # <-- control the inherit mode.
pod 'B only pod'
end
end
马其顿:https://guides.cocoapods.org/syntax/podfile.html目标马其顿:https://guides.cocoapods.org/syntax/podfile.html inherit_bang
如果你想控制pod
def common_pods
pod 'inherit_me'
end
target 'A' do
common_pods
pod 'lalala'
end
target 'B' do
common_pods
pod 'blablabla'
end