Skip to content

Instantly share code, notes, and snippets.

@derekcoder
Last active March 11, 2022 12:41
Show Gist options
  • Save derekcoder/6d4a86e222a440f1eefeacb901e4d8a6 to your computer and use it in GitHub Desktop.
Save derekcoder/6d4a86e222a440f1eefeacb901e4d8a6 to your computer and use it in GitHub Desktop.
Podfile swift version setup
# 1
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |configuration|
configuration.build_settings['SWIFT_VERSION'] = "4.0"
end
end
end
# 2
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Lib'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
end
# 3
swift4 = ['Lib1', 'Lib2']
post_install do |installer|
installer.pods_project.targets.each do |target|
if swift4.include?(target.name)
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment