Last active
September 4, 2019 15:20
-
-
Save JohnSundell/519cb322978ac59f5ac161ff67e4413b to your computer and use it in GitHub Desktop.
A Podfile that demonstrates how to use dependencies that use an older Swift version
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
target 'MyTarget' do | |
use_frameworks! | |
# Post installation script that enables the Swift 4.2 compiler's | |
# legacy 4.1 mode for 4.2-incompatible pods | |
post_install do |installer| | |
incompatiblePods = ['PodA', 'PodB'] | |
installer.pods_project.targets.each do |target| | |
if incompatiblePods.include? target.name | |
target.build_configurations.each do |config| | |
# Replace with whichever Swift version you're migrating from | |
config.build_settings['SWIFT_VERSION'] = '4.1' | |
end | |
end | |
end | |
end | |
pod 'Unbox' | |
pod 'Wrap' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment