Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I downgrade from Swift 4 to Swift 3?

I just upgraded my code from Swift 3 to Swift 4. Later, I changed my mind and wanted to use my code with iOS 10. Then I got this error:

“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.

I used the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version but then it said

'No Filter Results'.

Then, I tried to use Build Settings and changed 'SWIFT_VERSION' from 4.0 to 3.1 and also 3.0. However, the error persisted. Does anyone know a solution to this? Thanks in advance!

like image 332
skytect Avatar asked Jan 03 '23 21:01

skytect


1 Answers

Clean your project (CMD + Shift + K) and make sure the SWIFT_VERSION on every target is set to Swift 3 using Xcode 8.3.3

like image 135
Jeroen Bakker Avatar answered Mar 07 '23 13:03

Jeroen Bakker