多个项目target 公用一套cocoapods 写法Podfi

2019-08-13  本文已影响0人  白色天空729
platform :ios, ‘9.0’

targetsArray = ['pro1','pro2']

targetsArray.each do |t|
  target t do
    pod 'MJRefresh', '~> 3.1.12'
    pod 'MJExtension', '~> 3.0.13'
  end  
end

更骚的写法:源自网络,出处忘了。。不好意思

platform :ios, ‘9.0’

def testing_pods
  pod 'MJRefresh', '~> 3.1.12'
  pod 'MJExtension', '~> 3.0.13'
  pod 'FMDB', '~> 2.6.2'
  pod 'SDWebImage', '~> 3.8.1'
end


targetsArray = ['pro1','pro2']

targetsArray.each do |t|
  target t do
    testing_pods
  end
end
上一篇下一篇

猜你喜欢

热点阅读