Swift 5 Release Notes for Xcode 10.2 Beta
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
), aWritableKeyPath
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 normaldefault
case.
Previously:
- Swift ABI Stability Dashboard
- Flattening Nested Optionals Resulting From try?
- Splitting a Swift Sequence Into Head and Tail
- String’s ABI and UTF-8
- Swift Proposal: Non-Exhaustive Enums
- ExpressibleByStringInterpolation in Swift 5
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.