Skip to content

Instantly share code, notes, and snippets.

@larryonoff
Last active September 16, 2018 11:27
Show Gist options
  • Save larryonoff/86ea8c4da419fc884ef24fd28bf44756 to your computer and use it in GitHub Desktop.
Save larryonoff/86ea8c4da419fc884ef24fd28bf44756 to your computer and use it in GitHub Desktop.
CocoaPods sample to fix compilation
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