“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift."

前端 未结 7 1590
南方客
南方客 2021-02-02 14:27

Ever since I\'ve updated to Xcode 8.2 (GM seed, from the App Store), I have been stuck at the following error:

Use Legacy Swift Language Version” (SWIFT_V

7条回答
  •  野的像风
    2021-02-02 14:45

    I've had the same problem about "Use Legacy Swift Language Version..", my have solved it by setting the version, The tips to resolve the problem are:

    1. when you open the target ,there will show a notice to "Convert to Current Swift Syntax", you should choose the "Later", next there also have a another notice ,still choose "Later".
    2. If your target already added CocoaPods, please add that code in the end of your podFile:

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

    after add that code, please update cocoaPods.

    1. Click pod file,there will show all third party libraries list. find out "Build Setting" of every library,and search the "Use Legacy Swift Language Version"types, set it’s value to be YES.
    2. There may be some warnings or errors,there are come from version upload,you can correct them through the red circle prompt.

    -----If you not add cocoaPods ,you can set the targets’ version be YES(TARGETS->Build Setting-->Use Legacy Swift Language Version-->YES) Hope that can help you.

提交回复
热议问题