Skip to content

Instantly share code, notes, and snippets.

@getaaron
Created October 1, 2017 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save getaaron/a930f05438b8625bd8308c7b2fdf345c to your computer and use it in GitHub Desktop.
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
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