Instantly share code, notes, and snippets.

Embed
What would you like to do?
A Podfile that demonstrates how to use dependencies that use an older Swift version
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