Can I use Swift 2.3 structures in a Swift 3 project?

In my project, I transferred all my personal fast 2.3 files quickly. I would like to use obsolete frameworks written in swift 2.3 until they have a fast version 3.

I tried adding "Use Legacy Swift Version = Yes". Clean / create my project, but I still have some problems, and xCode will ask me to transfer my frameworks to swift 3 (which is simply not possible, because these are libraries) ....

How can I continue to use my 2.3 libraries?

+5
source share
2 answers

Try using this:

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '2.3' end end end 

Please note that this will set all your goals in swift 2.3. If you want one specific, you can do something like this:

 post_install do |installer| installer.pods_project.targets.each do |target| if target.pod_name == 'DesiredPod' target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '2.3' end end end end 
+1
source

For yes enter image description here

0
source

Source: https://habr.com/ru/post/1257553/


All Articles