How to set the Legacy Swift Versions for each Pod in Podfile
<p>I am currently setting the legacy in the <code>Podfile</code> to <code>SWIFT_VERSION = 2.3</code>, but some of the libraries I am using are Swift 3.0, which means that I need to manually set the legacy for all <code>Swift 3.0</code> pods legacy to <code>No</code> on each <code>pod install</code>. How do I configure each pod version in the <code>Podfile</code> installer?</p>

<p>This is what I am setting:</p>

<pre class="lang-rb prettyprint-override"><code>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
</code></pre>

<p>If I set <code>config.build_settings['SWIFT_VERSION'] = '3.0'</code>, than we have issues with <code>Swift 2.3</code> pods. The best solution is if we set each pod legacy version separately to avoid having to manually set it.</p>