美文网首页
podfile 中 Hooks的详细使用

podfile 中 Hooks的详细使用

作者: 我会回来的 | 来源:发表于2022-08-15 14:14 被阅读0次

例子 : Hooks 可实现  关闭所有target的Bitcode功能。

podfile 的使用如下:

platform : iOS,‘9.0’

target ‘TestCocoPods’ do 

 pod ‘你需要的三方库’

# 实现post_install Hooks 

post_install do |installer|  

#1 遍历项目的所有target 

    installer.pods_project.targets.each  do |target| 

#2 遍历build_configurations 

       target.build_configurations.each do |config|

#3 修改build_settings中的ENABLE_BITCODE 

           config.build_settings['ENABLE_BITCODE'] = 'NO'

         end

    end

end 

相关文章

网友评论

      本文标题:podfile 中 Hooks的详细使用

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