Learn why ABI Stability is important in this article:
ABI stability enables OS vendors to embed a Swift Standard Library and runtime in the OS that is compatible with applications built with Swift 5 or later.
ABI stands for Application Binary Interface. At runtime, Swift program binaries interact with other libraries through an ABI. It defines many low level details for binary entities like how to call functions, how their data is represented in memory, where metadata is and how to access it.
ABI stability means locking down the ABI to the point that future compiler versions can produce binaries conforming to the stable ABI. It enables binary compatibility between applications and libraries compiled with different Swift versions.
Earlier, Swift was not ABI stable, so each binary was bundling its own version of the Swift Dynamic Library. If you open an .ipa you can find swift standard libraries (.dylib) in SwiftSupport or Frameworks.
Suppose Apple music is using Swift 3.2, so it bundles Swift 3.1 Dynamic Library inside but the Notes app is using Swift 4.0, so it bundles Swift 4.0 and it’s 4.0 ABI.
Now Swift 5 is ABI Stable, Swift will be embeded within the iOS Operating System and it’s ABI will be compatible with every version of Swift. i.e Apple Music is using Swift 5.0, but Notes app is using Swift 5.2, and both are consuming Swift ABI embedded in the Operating System.
Listen about binary compatibility and module stability more in this podcast
This is a free third party commenting service we are using for you, which needs you to sign in to post a comment, but the good bit is you can stay anonymous while commenting.