1

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

Wim
  • 378
  • 2
  • 6
  • 14
  • 1
    Does this answer your question? [Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.0 compiler](https://stackoverflow.com/questions/55352985/module-compiled-with-swift-4-2-1-cannot-be-imported-by-the-swift-5-0-compiler) – Joakim Danielson Oct 27 '20 at 09:13
  • no that question states that it cannot import swift 4 in swift 5. My problem is that when I build with target swift 4, i still get a swift 5 package – Wim Oct 27 '20 at 12:29
  • Have you tried this one? https://stackoverflow.com/a/46080904/11421839 You can set the swift version for your compiler there. – Terry Windwalker Aug 25 '22 at 18:27
  • Sorry too long time ago. The issue has been resolved but with a lot of struggling an manual porting. – Wim Sep 01 '22 at 06:46

0 Answers0