How to fix “SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0” error in Xcode 10.2?

后端 未结 15 2137
情歌与酒
情歌与酒 2020-11-30 23:48

I\'m trying to run downloaded from app, try to open in Xcode and have an error:

\" Showing Recent Messages
:-1: SWIFT_VERSION \'3.0\' is unsu

相关标签:
15条回答
  • 2020-12-01 00:06
    1. open MyProject.xcodeproj/project.pbxproj in the editor (e.q. Sublime)

    example Calculator.xcodeproj

    1. Rename all SWIFT_VERSION = 3.0; Rename all SWIFT_VERSION = 5.0;

    enter image description here

    0 讨论(0)
  • 2020-12-01 00:09

    ******** Easiest way: **********

    1.Click on PODs in the left column.

    2.In the centre column select the pod you want, then navigate to "build settings" in the top right panel.

    3.Then search "Swift Language Version" and change to a known version.

    0 讨论(0)
  • 2020-12-01 00:10

    Select the target 'SimpleWeather' in the project and change language version Target->build setting -> Swift compiler language -> select 5, 4.2 etc

    image of build setting for changing compiler language

    0 讨论(0)
  • 2020-12-01 00:13

    For Xcode 10.1, select your Pods File

    -> Go to Build Settings -> Choose your Pod -> Search "Swift" -> Navigate to "Swift Language version" -> Set to desired language version.

    0 讨论(0)
  • 2020-12-01 00:13

    I came across this issue while developing a Cocoapod. I had an old .swift-version file in my repo that specified Swift 3.0.

    Running pod lib lint --verbose led me to this helpful response:

    Please remove the .swift-version file which is now deprecated and only use the swift_version attribute within your podspec.

    I deleted the file and added spec.swift_version = '5.0' to my podspec file to fix the problem.

    0 讨论(0)
  • 2020-12-01 00:14

    select pod like as per image and change swift language version this can save you one day

    0 讨论(0)
提交回复
热议问题