Swift 5 will make apps lighter and faster on current Apple systems

Swift 5 will make apps lighter and faster on current Apple systems

THE Swift It is undoubtedly one of Apple's most important moves this decade in terms of software: the programming language has made developing iOS apps simpler and more accessible, as well as making the apps themselves lighter, more capable and faster. Now, with the imminent release of Swift 5Things are about to get even better.

O 9to5Mac He took a look at some popular Swift-developed apps, and noticed that as they transitioned to Swift 5.0, their sizes will be greatly reduced. Examples include Apollo for Reddit, which jumped from 35.7MB to under 30MB; PCalc, from 86.8MB to less than 80MB, and Chirp, which jumped from 28.8MB to less than 20MB.

Note that the reductions depend, of course, on the device on which the apps are installed; the tests of 9to5Mac were performed on an iPhone XS Max.

The explanation for reducing applications is in the binary application interface (Application Binary Interface, or ABI), which roughly represents the code that links the application interface programming language libraries. Until Swift 4, the language's ABI was not stable, which required all apps developed with it to include libraries from all Swift versions, otherwise applications developed in Swift 3, for example, would not be compatible. with the Swift 4 binaries.

With Swift 5, however, ABI becomes stable and compatible with all binaries, which makes apps no longer need to bring libraries of all language versions and exactly this cutoff that causes the size of the files to shrink. applications. In addition to being smaller, apps may start faster, since loading each included library means a few milliseconds more when opening the software.

Initial Swift 5 support is already included in the upcoming (and already under test) iOS 12.2, macOS Mojave 10.14.4, watchOS 5.2 and tvOS 12.2; To enjoy the benefits, just keep your devices up-to-date and hope that developers upgrade their apps to the new language as soon as possible, and considering the advantages and ease of the transition, it should take no time.