Thursday, January 24, 2019

Swift 5 Release Notes for Xcode 10.2 Beta

Apple:

Swift apps no longer include dynamically linked libraries for the Swift standard library and Swift SDK overlays in build variants for devices running iOS 12.2, watchOS 5.2, and tvOS 12.2. As a result, Swift apps can be smaller when deployed for testing using TestFlight, or when thinning an app archive for local development distribution.

[…]

Key paths now support the identity keypath (\.self), a WritableKeyPath that refers to its entire input value (SE-0227)[…]

[…]

In Swift 5 mode, switches over enumerations that are declared in Objective-C or that come from system frameworks are required to handle unknown cases—cases that might be added in the future, or that may be defined privately in an Objective-C implementation file. Formally, Objective-C allows storing any value in an enumeration as long as it fits in the underlying type. These unknown cases can be handled by using the new @unknown default case, which still provides warnings if any known cases are omitted from the switch. They can also be handled using a normal default case.

Previously:

Update (2019-01-25): Patrick Balestra:

Created a new empty Swift project to see how much difference not including the dynamically linked Swift libraries made, and oh my god.

From 2,4MB to 24KB compressed IPA, users on iOS 12.2 are gonna love this!

And this is without importing any Swift library! The improvement is much bigger in real apps obviously.

4 Comments RSS · Twitter

"[…] running iOS 12.2, watchOS 5.2, and tvOS 12.2"

macOS?

What are the size of Swift standard library? How much MB per App is that saved?

[…] Swift 5 Release Notes for Xcode 10.2 Beta […]

Leave a Comment