Skip to content

Instantly share code, notes, and snippets.

@JohnSundell
Last active September 4, 2019 15:20
Show Gist options
  • Star 24 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save JohnSundell/519cb322978ac59f5ac161ff67e4413b to your computer and use it in GitHub Desktop.
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
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