WWDC 2019 Top 10 Videos
Wondering which of the over 100 WWDC 2019 videos you must see? Check out our recommendations! By Richard Critz.
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress, bookmark, personalise your learner profile and more!
Create accountAlready a member of Kodeco? Sign in
Contents
WWDC 2019 Top 10 Videos
25 mins
- 0) Platforms State of the Union – Session 103
- 1) Great Developer Habits – Session 239
- 2) Introducing SwiftUI: Building Your First App – Session 204
- 3) Modern Swift API Design – Session 415
- 4) What’s New in Xcode 11 – Session 401
- 5) Introducing Combine – Session 722
- 6) Advances in UI Data Sources – Session 220
- 7) What’s New in Swift – Session 402
- 8) Adopting Swift Packages in Xcode – Session 408
- 9) Introducing Sign In with Apple – Session 706
- 10) LLDB: Beyond “po” – Session 429
- 10+) Advances in Collection View Layout – Session 215
- Compositional Layout to the Rescue!
- Where to Go From Here?
3) Modern Swift API Design – Session 415
This session covers some emerging best practices for designing Swift-only APIs. Now that Swift provides both ABI (Application Binary Interface) and Module stability, it’s finally possible to build system frameworks entirely in Swift. SwiftUI and RealityKit are two shining examples.
The overall guiding principle of Swift API design remains the same as it was in 2016 when Apple first released its Swift API guidelines: Clarity at the point of use. While this obviously means that naming must be clear, it also means that usage must be clear.
The session addresses best practices for choosing between value and reference semantics or a mix of both, such as copy-on-write value semantics. It goes on to address appropriate use of protocols and generics and to identity common cases of misuse.
Finally, it shows how dynamic key path member lookup and property wrappers work together to enable some of the cool new capabilities used by SwiftUI.
4) What’s New in Xcode 11 – Session 401
This session presents and demonstrates many of Xcode 11’s new features. It starts by demonstrating the new workflows enabled by the completely rethought editor. Xcode now has as many independent editors as you like, each with its own mode and content. The canvas and the assistant editor are merged into the editor pane and display only when there is something to show. Split your workspace as many times as you like, both vertically and horizontally.
Xcode 11 also now provides full integration of Swift Package Manager. Swift packages are first class citizens, both in Xcode and in popular repositories such as GitHub, GitLab and Bitbucket. Moving from CocoaPods to SwiftPM couldn’t be easier! ;]
The session also covers a smorgasbord of other Xcode improvements including Git stash and cherry-pick, Mac device support in Storyboards, localization of assets in catalogs, environment overrides, better tracking of os_signpost
logging in Instruments and many more.
os_signpost
logging has you scratching your head, check out our tutorial Migrating to Unified Logging: Console and Instruments.
5) Introducing Combine – Session 722
This session introduces the new Combine framework. Using Apple’s words Combine is “a unified, declarative API for processing values over time.” Fans of third-party reactive programming frameworks will say, “But, we already have this!” What makes Combine exciting is that it’s not a third-party framework. You finally have a declarative solution to a number of asynchronous programming problems as part of the base operating system.
Combine thinks in terms of Publishers, Subscribers and Operators. Publishers, as you might expect, are the source of values and define how both values and errors are produced. Subscribers register with Publishers to receive those values. Operators act as both Publisher and Subscriber, transforming values received from a Publisher and sending them downstream to a Subscriber. This “dual identity” for Operators enables them to be chained together to handle more complex data flows.
Combine provides a host of pre-defined operators which Apple calls its Declarative Operator API. These operators are grouped into functional areas such as transformations, list operations, error handling, thread or queue movement, and time and scheduling.
As with SwiftUI, there’s more to say about Combine than fits in one session. Once you’re ready to do more with Combine, watch session 721, Combine in Practice. And, if you’re new to “reactive” programing, be prepared to watch these sessions several times!
6) Advances in UI Data Sources – Session 220
Anyone who has written many apps using UITableView
or UICollectionView
has almost certainly encountered the dreaded crash that comes when a data model gets out of sync with the UI. Even if you’re lucky enough not to have seen this crash, you’ve experienced the difficulties of keeping them synchronized and making incremental updates to the UI.
This session introduces a new approach: diffable data sources. These work by using a new, three step process: create a snapshot, populate that snapshot, call apply()
. It’s the simple!
Data items in a snapshot are identified by unique, enduring identifiers, not by IndexPath
s. The only requirements for a valid identifier are that it must be unique and it must conform to Hashable
. Since it’s trivial to make your own Swift struct
values meet these requirements, it’s possible to use your model values directly rather than looking them up based on an identifier. This can drastically simplify your code.
Since a number of table view and collection view delegate methods still reference cells by IndexPath
, there is an API to translate between IndexPath
and identifier.
Once you’ve made the snapshot reflect the new state of your data model, you put the update on screen by calling apply()
. The system takes care of working out insertions and deletions, all while providing smooth, automatic animations. Of course, you can disable the animation if your user experience calls for that. And, best of all, you can call apply()
on a background thread! The only restriction is that you must always call it either on a background thread or on the main thread.
7) What’s New in Swift – Session 402
Since WWDC 2018 last June, Apple has finalized and shipped Swift 5.0, and Swift 5.1 is in beta as part of Xcode 11. This talk highlights a number of the changes to Swift over the past year.
One of the most important new features is ABI — Application Binary Interface — stability in Swift 5.0. This allows programs to use frameworks built with a different compiler than the one which built the program itself. Swift 5.1 introduces Module stability, enabling Swift modules and the programs that import them to be build with different compiler versions. This enables bundling frameworks and the Swift run-time with the operating system — matching the state of the world that exists with Objective-C — which gives smaller binaries and faster app launch.
Having the Swift run-time ship with the operating system allows other performance benefits as well. It’s now possible for Apple to optimize the bridging of what they call currency types — common types such as String
and Dictionary
— resulting in significant improvements in bridging performance.
Swift 5.0 changed the way the compiler represents strings; they are now encoded as UTF-8 instead of UTF-16. You may have encountered this in your own code if you depended on the underlying representation of String
. This change allows simpler interoperability with C APIs because the strings no longer require conversion. It also allows faster bridging between String
and NSString
types, improving overall app performance. For example, SwiftNIO experienced a 20% increase in throughput as a result of this change.
The session also addresses tooling improvements, such as the officially supported Docker image and Language Server Protocol (LSP) support in SourceKit. It also covers some of the new language features that have been approved, or are currently in review, that enable some of the cool new technologies, such as Swift UI.