When i opened my project into Xcode 8 then I got the following error
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
referring to a similar post on StackOverflow , Use Legacy Swift Language Version YES/NO . But it's not working for me either by doing YES or No value ?
Please help.
I have checked Use Legacy Swift Language Version to options YES/NO please check attached screenshot
Add this to your pod-file:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'yourappname' do
pod 'yourpodlists'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3' ## or '3.0'
end
end
end
end
Run pod-install again. Clean your project with cdm + alt + shift + k
. Clean again using cmd + shift + k
. Restart Xcode. Build. Now it should work.
If you're not using cocoapods, you should be able to fix this issue by setting the Compiler Version attribute Use Legacy Swift Language Version
from unspecified to Yes or No.
Build settings of the project or library ->
try converting swift code to swift3 or swift 2.3. edit -> convert -> to current swift-> select swift 3 or swift 2.3. This will works.
I am using Xcode 8.3.3 After surfing too much and working around i found this solution, and this worked for me.
Here are the steps.
1=> select your target from Xcode
2=> go to build setting
3=> search for "Swift Language Version"
4=> change it to swift 3. (or accordingly.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With