In this article, I’ll aim to briefly outline some of the most interesting talks from WWDC 2019 along with a short summary of what they cover. This is a work in progress and I intend to continue to update and edit it to be more useful over the next week or two.

If a talk sounds interesting to you, then I suggest you click through and view it and take some notes if you have not yet done so.

Sessions About Combine

Session 721 – Combine in Practice

This session started with Mike LeHew from the Foundation team giving a brief overview of Combine. He talks about Publishers and Subscribers, and about those things that can establish relationships between the two. Such existing mechanisms include Callbacks, Closures, Notifications, and Key-Value Observation. The aim of Combine, he explains, is creating a unified abstraction for these kinds of relationships – a unified, declarative API for processing values over time.

Mike then goes on to describe an example (involving a Wizard) about using Combine in practice. He talks about how NotificationCenter has been extended with support for exposing its Notifications with Publishers.

He mentions the importance of Error Handling in Combine and describes how this should be set up.

Also covered in this talk are Schedulers and time, and Design patterns.

[The talk continues with example code of Combine being used for some sudo-practical purpose].

Session 722 – Introducing Combine

This session began with Tony Parker talking about Asynchronous Programming Approaches through the mechanism of using an example app.

He talks about how the aim of Combine was to look at what was common with the existing Asynchronous Interfaces in the Cocoa framework and how to combine these.

So Combine is defined as “A unified, declarative API for processing values over time”.

He talks about the features of Combine, such as the fact that it uses Generics, it’s Type-Safe, it emphasizes Composition first, and it is Request driven. So basically it looks to adopt those principles of Swift that Apple has been keen to emphasize over recent years.

So this particular talk focuses on the basic elements of Combine which are Publishers, Subscribers, and Operators.

Publishers define how values and errors are produced, they are value types, allowing the registration of a Subscriber. Being designed using Swift fundamentals, Publisher is a protocol. One example is an extension on NotificationCenter to add a publisher.

Subscribers

Subscribers are the counterpart to publishers, they’re what receive values, including the completion if the publishers are finite. Because suscribers usually act and mutate state upon receipt of values we use reference types in Swift which means they are classes.

Here is the protocol for Subscriber:

Subscriptions

A Subscription is “a protocol representing the connection of a subscriber to a publisher“, Subscriptions are class constrained because a Subscription has identity – defined by the moment in time a particular subscriber attached to a publisher. CancelingSubscriptionmust be thread-safe. You can only cancel a Subscription once. Canceling a subscription frees up any resources previously allocated by attaching the Subscriber.

The Pattern – 6:25

Adopts Publisher

Describes a behavior for changing values

Subscribes to a Publisher (“upstream”)

Sends result to a Subscriber (“downstream”)

Value type

Operator construction – 10:00

Declarative Operator API – 11:04

Stuff this session deliberately does not cover includes Error handling and cancellation, Schedulers and time, and Design patterns – this is because this content covered in Session 721.

Sessions about Networking

Session 712 – Advances in Networking, Part 1

“Keep up with new and evolving networking protocols and standards by leveraging the modern networking frameworks on all Apple platforms and following best practices for efficiency and performance. In this session, learn about Low Data Mode, Combine in URLSession, WebSocket, and improvements to…”

Session 713 – Advances in Networking, Part 2

“Take your networking apps to the next level with advances in Bonjour, custom message framing handlers, and the latest in security. You’ll also learn how to understand your networking performance by collecting metrics, and how best to use the modern networking frameworks on Apple platforms.”

Sessions about UI and SwiftUI

Session 204 – Introducing SwiftUI: Building Your First App

“See SwiftUI in action! Watch as engineers from the SwiftUI team build a fully-functioning app from scratch. Understand the philosophy driving this new framework and learn about the benefits of declarative-style programming. Take a look under the hood to understand how SwiftUI operates and learn how SwiftUI and Xcode 11 work together to help you to build great apps, faster.”

Session 216 – SwiftUI Essentials

“Take your first deep-dive into building an app with SwiftUI. Learn about Views and how they work. From basic controls to sophisticated containers like lists and navigation stacks, SwiftUI enables the creation of great user interfaces, faster and more easily. See how basic controls like Button are both simple yet versatile. Discover how to compose these pieces into larger, full-featured user interfaces that facilitate building great apps with SwiftUI. Build your SwiftUI skills as you learn the essentials of Apple’s new declarative framework.”

Session 220 – Advances in UI Data Sources

“Use UI Data Sources to simplify updating your table view and collection view items using automatic diffing. High fidelity, quality animations of set changes are automatic and require no extra code! This improved data source mechanism completely avoids synchronization bugs, exceptions, and crashes! Learn about this simplified data model that uses on identifiers and snapshots so that you can focus on your app’s dynamic data and content instead of the minutia of UI data synchronization.”

Session 231 – Integrating SwiftUI

“SwiftUI is designed to integrate with your existing code base on any of Apple’s platforms. Learn how to adopt SwiftUI on any Apple platform by adding SwiftUI views into your app’s hierarchy, leveraging your existing data model and more.”

Session 237 – Building Custom Views with SwiftUI

“Learn how to build custom views and controls in SwiftUI with advanced composition, layout, graphics, and animation. See a demo of a high performance, animatable control and watch it made step by step in code. Gain a deeper understanding of the layout system of SwiftUI.”

Other

Session 429 – LLDB: Beyond “po”

Beginning with a refresher on using po in Xcode the presenter goes on to explore more advanced capabilities of LLDB in the context of debugging. He describes how po works under the hood to print an object description. Next, we look at p as an alternative to po and have a look at how the path of what happens when using p differs from the process involved in po. Next, moving onto the v (frame variable) command as the third mechanism for “printing” out stuff when debugging using LLDB. This mechanism will not execute code at any point (in contrast to the other “printing” methods).

The three methods for displaying variables in LLDB debugging have characteristics like:

Customizing Data Formatters – Jonas Devlieghere – Time Code 12:10

In LLDB data formatters define how variables are displayed in the debugger. We can do a lot with these by using filters, String summaries, and synthetic children.

Filters are used to limit the output of existing formatters. By adding a filter we can specify that we only want to see a limited amount of info.

Etc etc….

Python Formatters – 14:48

LLDB Scripting Bridge

Now Python 3 has been implemented to replace Python 2 for scripting starting in Xcode 11.

We can use Python to define formatters directly in LLDB, or we can create a python file (.py) to do this (Time Code: 17:30).

Because this session builds on previous talks it’s worth also looking at this 2018 session: https://developer.apple.com/videos/play/wwdc2018/412

 

 452 total views,  1 views today

Last modified: July 11, 2019

Author

Comments

Write a Reply or Comment

Your email address will not be published.