Xcode Keeps Showing:-1: Swift_Version '5.0' Is Unsupported, Supported Versions Are: 3.0, 4.0, 4.2.Any Solution

Xcode keeps showing:-1: SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2.Any solution?

Change the podfile swift version like for any pod if you are getting this error
like

Select pods of your project

Select pod of your project

After then you follow the steps as described in the image and change the swift version for the pod
next steps

Unsupported swift version (SWIFT 5)

For XCode 10.1, select your Pods File

Select Pod

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

Sample Image

SWIFT_VERSION '5.0' is unsupported, supported versions are: 3.0, 4.0, 4.2. (in target 'SwiftyJSON')

I found it. I am not familiar with XCode so it was not very straightforward for me.
I clicked "Pods" on the project tree on the left, then clicked the dropdown to select SwiftyJSON from the list at the top left corner. Then changed the Swift version which was set to 5.0. See the image.

Sample Image

Cheers

Error when upgrade pod file to new swift version

Update Your Xcode to 10.2 or manually set versions in pod as following

pod 'Eureka',  '~> 4.3.1'

When you keep pod in podfile, cocoapods installs latest version of the library.
In your case, the latest version is written in Swift 5, but your xcode does not support Swift 5, you must set the pod version for installing lib with the supported version of swift.

Problem with Swift version using Alamofire

Go to your POD's project Settings, select your target (Alamofire in this case), then in the Build Settings Section, search for swift language version and change it to 4.2



Related Topics



Leave a reply



Submit