Created
October 1, 2017 21:48
-
-
Save getaaron/a930f05438b8625bd8308c7b2fdf345c to your computer and use it in GitHub Desktop.
Xcode 9 Podfile for supporting both Swift 3.2 and Swift 4 Cocoapods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
platform :ios, '9.3' | |
target 'target-name' do | |
use_frameworks! | |
pod 'AFNetworking', '~> 2' | |
pod 'RSBarcodes_Swift', :git => 'https://github.com/yeahdongcn/RSBarcodes_Swift', :branch => 'master' | |
swift3 = [] | |
swift4 = ['RSBarcodes_Swift'] # if these pods are in Swift 4 | |
post_install do |installer| | |
installer.pods_project.targets.each do |target| | |
swift_version = '3.2' if swift_32.include?(target.name) | |
swift_version = '4.0' if swift4.include?(target.name) | |
if swift_version | |
target.build_configurations.each do |config| | |
config.build_settings['SWIFT_VERSION'] = swift_version | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment