Unsupported Swift Version 3.x in Xcode 10.3

233 Views Asked by At

I keep downloading sample codes and many times it says "Unsupported Swift Version 3.x...Use Xcode 10.1 to migrate the code to Swift 4".

  1. Why is it not possible to migrate to Swift 4 using Xcode 10.3 or Xcode 11 beta?

  2. More importantly, I am using Swift 4.2 in my own Project that has several dependancies as well through Pods. If I don't upgrade to Swift 5.1 or later, it seems my own project would start getting such errors in Xcode 12 or so, correct? While I can convert my own code to Swift 5.1, I have no idea if dependencies such as SwiftyDropbox would migrate to Swift 5.1 so easily. What implications it would have for my project in future and what could I do to future proof my project in that case?

1

There are 1 best solutions below

0
On
  1. Ask Apple. The company has decided – certainly for good reasons – to migrate files only to the Current Swift Syntax. Feel free to create legacy system partitions with older versions of Xcode to migrate code step by step.

  2. The grace period to update the Swift version is long enough to ensure a smooth transition. At least Xcode allows to use the 3 most recent Swift versions in the same project. However you are responsible to maintain the version control. Check the dependencies periodically for updates. If a dependency is not able to release an update within the grace period it's not much good.