Last active
March 11, 2022 12:41
-
-
Save derekcoder/6d4a86e222a440f1eefeacb901e4d8a6 to your computer and use it in GitHub Desktop.
Podfile swift version setup
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
# 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