How to set the swift compiler version?

Hi,


I am new at developing with Swift so I guess I am missing something...

I have an iOS app built in Swift 3, which is no longer supported in xCode. So I guess I need to migrate to a newer version of swift. Xcode (10.1) suggests Swift 4.2.
But ... There is a dependency which uses Swift 3. I tried recompiling this library (using Xcode 12.1 because I get some built errors in Xcode 10.1). In that project the Swift version is set on Swift 4.2. I compiled the and added the package to the original app.

Now I get an error: Module compiled with Swift 5.3 cannot be imported by the Swift 4.2 compiler.

How can is get the package compiled with Swift 4.2?


Thanks
Can't you recompile the library with Xcode 10.1 ? In order to have everything at the same level ?

Or port all to 5.3 if that's possible.
I have started with the port to 5.3 but why is the build of the package still 5 while i tell it to use the swift 4 compiler?
How to set the swift compiler version?
 
 
Q