I have released several apps written in Swift 2.0 and 2.1. Now Apple just open source Swift and announced that Swift 3.0 will be released next year. So will my apps still works after Swift 3.0's release?
Apple created Swift, an open-source programming language, as a replacement for all languages based on C, including Objective C, C++, and C. The language was created in 2014 and released to the public as an open-source project in 2015 on Swift.org.
Swift is a robust and intuitive programming language created by Apple for building apps for iOS, Mac, Apple TV, and Apple Watch. It's designed to give developers more freedom than ever. Swift is easy to use and open source, so anyone with an idea can create something incredible.
I think you are asking two separate questions here.
In regards to the first question, yes your app will execute even though it was compiled against Swift 2. Swift apps have the Swift runtime libraries embedded in their bundles so you are safe in this regard. You will notice that Swift bundles are always about 4-5 MB larger than their Objective-C counterparts and this is precisely why.
In regards to the second question, as with any new OS release there is no guarantee that your apps will work as they did on previous versions of the OS. Although, from my experience Apple has done a pretty decent job of keep things backwards compatible over the last couple of OS releases, though your mileage may vary.
If you're asking if your code written in Swift 2.0 / 2.1 will compile under Swift 3.0, it's possible that it won't. Quoted from Swift Programming Language Evolution:
Full source compatibility: Swift 3.0 will not provide full source compatibility. Rather, it can and will introduce source-breaking changes needed to support the main goals of Swift 3.0.
But like @Randy said, your previously-compiled app will still run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With