Last active
September 16, 2018 11:27
-
-
Save larryonoff/86ea8c4da419fc884ef24fd28bf44756 to your computer and use it in GitHub Desktop.
CocoaPods sample to fix compilation
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
post_install do |installer| | |
targetsMap = { | |
'4.0': [ | |
'BetterSegmentedControl', | |
'Dwifft', | |
'JTAppleCalendar', | |
'MessageKit', | |
'PKHUD', | |
'RxCocoa', | |
'RxSwift', | |
'RxSwiftExt', | |
'SkyFloatingLabelTextField' | |
], | |
'4.1': [ | |
'DifferenceKit', | |
'EasyPeasy', | |
'LayoutKit', | |
'Realm', | |
'RealmSwift' | |
] | |
} | |
installer.pods_project.targets.each do |target| | |
targetsMap.each do |swift_version, targets| | |
if targets.include? target.name | |
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