我目前在Podfile
to中设置 legacy SWIFT_VERSION = 2.3
,但我使用的一些库是 Swift 3.0,这意味着我需要手动将所有Swift 3.0
pod legacy 设置为No
每个pod install
. 如何在Podfile
安装程序中配置每个 pod 版本?
这是我正在设置的:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3'
end
end
end
如果我设置config.build_settings['SWIFT_VERSION'] = '3.0'
了,那么我们就会Swift 2.3
遇到 pod 问题。最好的解决方案是,如果我们分别设置每个 pod 旧版本以避免手动设置它。