Since I install Xcode 8.2 I can't build my app anymore. I have this message
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
Is there a way to fix this?
Thanks for your help
The general fix for this issue is to ensure all of your dependencies have a SWIFT_VERSION of 3.0 and not the 3.0.1 that Xcode 8.1 may have entered. We'll update the Alamofire projects to make sure they work, but if you're using CocoaPods, setting your main project to 3.0 should set all of the pods to that version as well.
Thanks! It worked! ;-)
please give a sample!
pod 'Alamofire', '~> 4.0'
Fixed the problem
I'm having the same issue as the OP here.
Anyone have anymore ideas on this topic? The above comments don't seem to be working for me. Jshier is probably correct, and I'm probably doing something wrong.
I tried adding:
config.build_settings['SWIFT_VERSION'] = '3.0'
... to my podfile, but it isn't fixing the issue.
There's nothing to change here for Alamofire, as I've verified that it builds fine in Xcode 8.2. Ultimately the solution here is to edit your app project files and replace every instance of a SWIFT_VERSION of 3.0.1 with 3.0.
oh, I find true way fix the same problem:
https://forums.developer.apple.com/thread/69340
Toggling the "Use Legacy Swift Language Version" setting from "no" to "yes" and "yes" to "no" did the trick for me.
Most helpful comment
oh, I find true way fix the same problem: