Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Would Swift 5 apps be able to run only on specific iOS versions?

Recently I have read a few articles about Swift 5 being ABI Stable (which basically means you won't need to pack app's own version of the Swift Dynamic Library within the App bundle) and here is the confusing part:

because Swift will be embedded within the iOS Operating System.

Now that sounds like Swift Dynamic Library would now go directly into iOS. Would that mean that Apps compiled Swift 5 will be able to run only on specific iOS versions?

like image 833
roxanneM Avatar asked Oct 11 '18 15:10

roxanneM


1 Answers

You're on the right track, but the point is that the app would only run on a specific iOS version or later. The whole goal of ABI stability is to allow a Swift binary (i.e. an app) that was compiled with one version of Swift to be able to interoperate with a binary (i.e. a framework) that was compiled with a different version of Swift.

But yes, to make use of ABI stability, your app would only be able to run on iOS 13 (or whatever version it turns out to be), or later.

This is how things work in ObjC (and C and C++ and most languages). I can build my Objective-C app on iOS 10 and expect that it will link with Foundation and UIKit on iOS 11 without trouble. You can't do that with a Swift library today.

like image 178
Rob Napier Avatar answered Oct 23 '22 02:10

Rob Napier