For dynamic frameworks, this property shown as "Use Legacy Swift Language Version" - Yes, No.
But after every pod update, CocoaPods removes this settings from Pods project and you need to set this settings again, manually.
To acheive this problem, you can use post_install script below in your Podfile :
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
# set true if all pods in the pod_project needs to be flaggged as swift 2.3 | |
legacy_swift_pods_project = true | |
# Array for pods that will be flagged as swift version 2.3 | |
# if legacy_swift_pods_project is true, you don't need to add any item in array. | |
legacy_swift_pods = ['Alamofire'] | |
post_install do |installer| | |
if legacy_swift_pods_project | |
installer.pods_project.build_configurations.each do |config| | |
config.build_settings['SWIFT_VERSION'] = '2.3' | |
end | |
end | |
installer.pods_project.targets.each do |target| | |
if legacy_swift_pods.include? target.name | |
target.build_configurations.each do |config| | |
config.build_settings['SWIFT_VERSION'] = '2.3' | |
end | |
end | |
end | |
end |
Hiç yorum yok:
Yorum Gönder