Can I add Swift 3 in Xcode11?

2020-03-26 swift3 cocoapods xcode11

I am using some Cocoapods packages that works well in Swift 3.2. If I changed those packages I need to do lot of code editing which will consume lot of time and effort. Is there any ways to add Swift 3 to Xcode 11?

Answers

I doubt you can ADD a Swift version. I.e. use 5.1 for your code and 3.1 for libraries. AFAIK, all binaries have to be built using the same compiler.

Technically, you can CHANGE the toolchain. This article illustrates how (not sure if nowadays 3.1 is stretching this though):

Medium Blog about Xcode toolchains

However, I doubt that you can submit apps built with 3.1 to the AppStore.

I also wonder if you really even want to try to buy into this. If you use Swift 3.1 you may need to make sure to bundle the runtime with your app. Since one of the more recent evolutions of iOS, the Swift runtime is not packaged with apps anymore, but relies on the OS runtime.

Good luck on this endeavor. Really want to kick all the Swift 5.x goodies? ;)

Related