Swift.org blog: ABI Stability and More

Please don't be worried about this, it should always be okay to ask questions when you've already looked for answers!

Let’s suppose that I have an app which is coded using swift 4.2 and it has many dependencies built with ABI 4.2.X

In order to jump to the new ABI 5.X.X, we have requested our third party’s to recompile their frameworks with the new ABI. My first question is, do these framework should be written using Swift 5? I understand that no because Swift version and ABI level are independent

As Jean-Daniel mentioned, this is correct; the language compatibility version is independent of the ABI. The frameworks you're using will have to recompile with Xcode 10.2, but they can keep using Swift 4 or 4.2 modes. (If they're using Swift 3 mode, though, that's been removed.)

Once we have every third party library ready we update them on the app and start using the new ABI level of Xcode. My second question goes here, do we need to update also the Swift version or not? What I expect is to be able to update the ABI level and after check that we haven’t broken anything on the app, migrate the app to Swift 5.X

You shouldn't need to update your app's language version either (though again, you can), as long as you're not using Swift 3 mode.


The references to module stability go back to what's in this blog post: ABI stability means that two binary frameworks will work together at run time, but the compiler in Xcode 11 still isn't able to understand the framework content from Xcode 10.2. Starting in Xcode 11, however, there's a new format for binary framework module interfaces that's intended to be stable going forward (so Xcode 11.1 won't have the same problem). @harlanhaskins and I gave a talk about it at WWDC, "Binary Frameworks in Swift".

3 Likes