博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CocoaPods 给每个库单独指定 Swift 版本教程
阅读量:7167 次
发布时间:2019-06-29

本文共 729 字,大约阅读时间需要 2 分钟。

苹果每年都更新 Swift 版本,但是平常项目中使用的一些开源库却不能及时更新,使用那就需要一部分库继续使用 Swift3.2 版本,一部分使用 Swift4,那么在 Podfile 中应该这么写:

# Swift 版本声明  post_install do |installer|        installer.pods_project.targets.each do |target|            if ['库的名字1','Jinkey'].include? target.name                target.build_configurations.each do |config|                    config.build_settings['SWIFT_VERSION'] = '4.0'                    config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'                end            else                target.build_configurations.each do |config|                    config.build_settings['SWIFT_VERSION'] = '3.2'                    config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'                end            end        end    end复制代码

转载地址:http://yitwm.baihongyu.com/

你可能感兴趣的文章
vue-router懒加载
查看>>
更改计算机名,VS无法连接TFS
查看>>
一个非长好用的在线编辑器
查看>>
Yii2配置Nginx伪静态的方法
查看>>
java集合类(六)About Queue
查看>>
hh:mm:ss时间格式那些事儿
查看>>
Sybase数据库在UNIX和Windows上的实施和管理 出版公告
查看>>
【译】Spring 4 Hello World例子
查看>>
新萌渗透测试入门DVWA 教程1:环境搭建
查看>>
Halcon算子翻译——dev_unmap_par
查看>>
wxPython - Python GUI
查看>>
Fiddler安卓抓包详细教程
查看>>
Design Summary
查看>>
首师大附中科创教育平台 我的刷题记录 0324 99999999海岛帝国:运输资源
查看>>
Web必知概念
查看>>
kali学习-被动信息收集-DNS相关
查看>>
Linux中Buffer和Cache的区别
查看>>
极简入门:什么是智能合约?
查看>>
Ajax - Apache安装配置
查看>>
九、双端队列LinkedBlockDeque
查看>>