Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a swift 3 framework in Swift 2.3

Tags:

ios

swift

I believe the answer is no, but I wanted to be certain. Can you compile a swift 2.3 app that contains a swift 3.0 framework?

like image 596
Cory Avatar asked Feb 07 '23 07:02

Cory


1 Answers

The answer is no :/ As Apple said:

Swift 3 is the primary development language supported within Xcode 8 so there are a couple notes to consider if you chose to continue using Swift 2.3. First, Swift 2.3 and Swift 3 are not binary compatible so your app's entire code base needs to pick one version of Swift.

Source and more informations on the Apple Swift Blog.

You will have to choose between 2.3 and 3.0. If you can, I think the best idea is to move directly to 3.0 (since 2.3 is just a "transitory" version).

like image 106
Julien Quere Avatar answered Feb 13 '23 06:02

Julien Quere