美文网首页
多个项目target 公用一套cocoapods 写法Podfi

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

作者: 白色天空729 | 来源:发表于2019-08-13 16:57 被阅读0次
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

相关文章

网友评论

      本文标题:多个项目target 公用一套cocoapods 写法Podfi

      本文链接:https://www.haomeiwen.com/subject/puubjctx.html