WWDC 2022 Viewing Guide

My WWDC 2022 viewing guide to help you plan the sessions you want to watch.

Where Do I Start?

Watch the Platforms State of the Union (SOTU) for a summary of what’s new. If you’re in doubt about where we’re headed here’s a quote from Josh Shaffer:

The best way to build an app is with Swift and SwiftUI.

You don’t have to learn everything new today!

There are ~175 sessions and a huge amount of new stuff to learn. You may feel like you’re getting left behind. Don’t let it overwhelm you. You’ve got time.

Many of the new API’s need iOS 16 so it may be a while before you can use them. Don’t burn yourself out trying to keep up.

Watching The Sessions

I watch the videos using the Apple Developer app. It’s available on macOS and iOS. The video player supports from 0.5x to 2x playback, most videos have transcripts and allow copying of the onscreen sample code.

There are a lot of sessions, but many are short (10-20 minutes). There’s no padding and Apple’s engineers get to the point quickly.

Swift

What’s new in Swift and the Swift Package Manager.

  • What’s new in Swift Recap of changes to Swift 5.7. Swift package command and build tool plugins. Module aliases. Swift concurrency improvements including opt-in safety checks and distributed actors. Regex builder, and more.
  • Embrace Swift generics A great explanation from Holly Borla on when and how to use generics. Watch this session if you’re confused about when to use some or any.
  • Design protocol interfaces in Swift Slava Pestov follows up with an explanation of modeling types with protocols. Combine this with the previous session on generics and you’ll be up to speed on a key change in Swift 5.7.
  • Meet distributed actors in Swift Extending Swift’s actor model for distributed systems.

Swift Regex

This is a great addition to Swift.

Swift Concurrency

SwiftUI

This is a big year for SwiftUI. Apple has fixed many of my pain points (and feedback reports).

  • What’s new in SwiftUI Swift charts. Data driven programmatic navigation stacks and split views. Scene API for windows. Resizable sheets and control improvements. Tables and customizable toolbars on the iPad. New shape styles for gradients, drop shadows. New grid layout and layout protocol for custom layouts.
  • The SwiftUI cookbook for navigation The new navigation API’s look great. This is a must watch SwiftUI session.
  • Compose custom layouts with SwiftUI Grid view and the custom layout protocol are going to make building many common layouts a lot less painful without the need for geometry reader. ViewThatFits will also be great for adaptive layouts.
  • The craft of SwiftUI API design: Progressive disclosure Lots of tips, using examples from SwiftUI, on designing your reusable components. Optimize for the common uses, intelligent defaults, optimize the call site and compose, don’t enumerate.
  • Efficiency awaits: Background tasks in SwiftUI Schedule background app refresh tasks with new API that uses Swift Concurrency and works across all platforms.
  • Bring multiple windows to your SwiftUI app Two new Scene types. Window for a single, unique window (WindowGroup allows multiple windows). MenuBarExtra for system menu bar control. Programmatically open new windows/documents.

Swift Charts

Did you need another reason to adopt SwiftUI?

  • Hello Swift Charts Another huge addition to SwiftUI. A declarative way to build great looking, and accessible charts.
  • Swift Charts: Raise the bar A deeper dive into the many types of charts and the wide range of customization options.

A couple of design-focussed chart sessions with ideas to make your charts effective and accessible:

UIKit

A reminder that UIKit still exists:

  • What’s new in UIKit Navigation bar styles and customizable toolbars. UICalendarView. Customizable page controls. Custom detents for sheets. Stage Manager deprecates some UIScreen APIs - don’t assume you’re on the main screen. UICollectionView cells are self sizing by default and can host SwiftUI views. UIDevice orientation is no longer supported.
  • Use SwiftUI with UIKit UIHostingController can now automatically update preferred and intrinsic content sizes. Use SwiftUI for collection and table view cells with UIHostingConfiguration.

AppKit and Mac Catalyst

  • What’s new in AppKit Get ready for Stage Manager. Updated settings appearance (preferences are now named settings). New combo buttons, color well styles, toolbar customization, compact (iOS style) alerts expand when needed. New sharing picker.
  • Use SwiftUI with AppKit Lots of examples taken from the Shortcuts macOS app. NSHostingController hosts a SwiftUI list for the split view sidebar. Each collection view cell uses NSHostingView to host SwiftUI. Representable protocols to embed AppKit controllers or views in a SwiftUI view.
  • Bring your iOS app to the Mac Native iOS apps on M1 can launch to true screen size or full screen on Mac. Opt-in to touch alternatives. Mac Catalyst has new API for window geometry and controls and to support the new desktop-class iPad toolbars.

iPadOS

Apple continues to bring macOS features to the iPad which makes it easier to build apps that work well on both platforms.

  • Meet desktop class iPad New navigation styles make room for center toolbar items. User customizable toolbars. Title menus and a more compact inline search bar.
  • Build a desktop-class iPad app Updating iPad apps with the new desktop-class navigation, collection view, menu and editing APIs. See the sample code.
  • Adopt desktop class editing interactions Many of the improvements to the text edit menu come for free. A new delegate method allows you to insert items into the menu. Inserting items with UIMenuController is now deprecated. New find and replace panel.
  • What’s new in iPad app design Designing iPad apps with the new desktop-class features. Examples cover a document based App and a content browser style App. See also the use of the new Table view.

A two-parter that walks through the many changes to iPadOS interfaces in iOS 16:

watchOS

The big new feature for watchOS 9 is probably WidgetKit but it also gains many of the SwiftUI improvements:

tvOS

The keynote barely mentioned tvOS but it does get some improvements:

Developer Tools

Xcode 14 has a big focus on performance improvements:

  • What’s new in Xcode Previews are interactive by default. New canvas control to vary traits like color scheme or dynamic type with no need to add preview code. SF Symbols now in library. Single target can support multiple platforms. Build (and testing) parallelization up to 25% faster depending on cores. TestFlight feedback in the organizer. Xcode can now generate all App icon sizes from a single 1024x1014 image (hooray!).
  • Use Xcode to develop a multiplatform app In Xcode 14, a single app target can support many destinations. New multiplatform app template uses SwiftUI and supports iPhone, iPad and Mac.

Xcode Cloud

DocC

Build System

  • Demystify parallelization in Xcode builds Xcode Build Timeline visualizes how it parallelizes a build (assistant editor when viewing the build log). Different colors for each target. Empty space show blocked tasks. Sandboxed shell scripts that define their inputs/outputs help the build system manage dependencies. Eager linking for pure Swift targets.
  • Link fast: Improve build and launch times Faster (2x) static linker in Xcode 14. Find balance between static (slower build times) and dynamic libraries (slower launch times). New tools dyld_usage and dyld_info to examine linking process.

Performance and Debugging

  • Track down hangs with Xcode and on-device detection New tools to detect when main thread is unresponsive. Thread performance checker shows hangs as runtime issues in Xcode navigator. Hang Detection Labeller in Instruments when profiling App. On-Device Hang Detection in Developer settings. Xcode Organizer shows aggregated hang reports for users who share app analytics.
  • Improve app size and runtime performance Swift runtime on iOS 16 precomputes protocol checks improving launch time. Objective-C message send up to 8 bytes smaller. Retain/release calls up to 4 bytes smaller. Autorelease elision faster and smaller.
  • Debug Swift debugging with LLDB Deep dive into LLDB and source path remapping. swift-healthcheck command.
  • Power down: Improve battery consumption Adopting dark mode, reducing frame rate, reducing use of services like location or audio when running in background, deferring work.

Swift Package Manager Plugins

Playgrounds

Other

Localization

  • Build global apps: Localization by example Translations depend on context. Joining strings can also cause problems. Export Localizations now also works for Swift Packages. SwiftUI Grid view and ViewThatFits helps to build layouts that adapt to localized string sizes.
  • Design for Arabic Optimizing for the Arabic script. UI is right-to-left. Arabic words are more concise but taller. Arabic fonts are not case sensitive and usually match Latin lowercase size. May want to increase Arabic font size by 10%. Nice touch to make this session available in Arabic
  • Get it right (to left) Supporting right-to-left (RTL) languages. Arabic and Hebrew are the most common RTL languages. SF Symbols supports RTL languages, flips forward/backward symbols, but not left/right symbols. Use the RTL Pseudolangauge to preview.

Accessibility

  • What’s new in web accessibility Use semantic HTML, add roles and ARIA attributes to custom controls. Speech Synthesis Markup Language (SSML) to control text-to-speech.
  • Create accessible Single App Mode experiences Single App Mode locks the device to a single app. Guided access lets users put any app in Single App Mode. Use the delegate methods to restrict features (e.g. account settings) during guided access. Apple Configurator locks devices into single app mode.

App Store and Distribution

Photos and Camera

Privacy and Security

System Frameworks

Core Data and CloudKit

  • Optimize your use of Core Data and CloudKit Explore how CloudKit sync works with test data generators in your tests and sample apps. Use Instruments and Logs to analyze what’s happening.
  • Evolve your Core Data schema Essential viewing if you’re using Core Data with CloudKit. CloudKit schema is immutable in production, you can add but never remove fields and records. Lightweight migration only changes the store on disk. Initialize the schema and promote changes from development to production.
  • What’s new in CloudKit Console Hide development and test containers. Act as an iCloud account to query private data for that account.

Transferable

  • Meet Transferable A new Swift declarative framework to describe and serialize your models for sharing. Transferable can make use of Codable conformance, but data and file representations are also possible.

Maps and Location

  • What’s new in MapKit Recompile to opt-in to new 3D City Experience. MKMapView properties are soft deprecated in iOS 16, use new map configuration API. New blend modes API. Selectable Map Features API. Look Around.
  • Meet Apple Maps Server APIs Four new server APIs for geocoding, reverse geocoding, search and ETA. Daily cap of 25,000 calls.
  • What’s new in Nearby Interaction ARKit enhanced nearby interaction to guide a user to a nearby object. Background interactions with Bluetooth accessories.

Networking

  • Reduce networking delays for a more responsive app MultipathServiceType to avoid stalls when migrating from cellular to WiFi. Use the network quality tool to measure buffer bloat. Enable L4S in developer settings/defaults to reduce queuing delay.
  • Build device-to-device interactions with Network Framework New DeviceDiscoveryUI framework pairs with Network framework to discover nearby devices and connect them. No need to request local network access.
  • Meet Background Assets New app extension to download large files from CDNs in background after app installation, update or periodically so updated content is available when user launches the app.

Other Frameworks

  • What’s new in Wallet and Apple Pay New SwiftUI API’s to add Apple Wallet and Apple Pay buttons. Automated recurring payments. Order Tracking (supported by Shopify, Narvar and Route). Identity Verification API for locations that allow users to add an ID to wallet.
  • What’s new in TextKit and text views All text controls in UIKit and AppKit now use TextKit 2. Now supports exclusionPaths that text will flow around. Improved line breaking for justified paragraphs. Avoid accessing the layoutManager property which triggers TextKit 1 compatibility mode.
  • What’s new in PDFKit Support Live Text in PDF documents. New API to create pages from images. Install overlay view on PDF page to allow drawing on page with PencilKit.

App Services

Widgets and App Clips

App Intents and Shortcuts

  • Dive into App Intents Support shortcuts by exposing your app’s functionality through App intents.
  • Implement App Shortcuts with App Intents Deeper dive into creating App shortcuts using intents.
  • Meet Focus filters Filter your app’s content and behaviour during a focus mode. Define what the user can customize with an App focus filter intent.
  • Design App Shortcuts The best features to turn into shortcuts are self-contained, lightweight tasks that don’t need your App in focus. Maximum of ten/app. Name should be brief, must include App name. One dynamic parameter per shortcut.

HealthKit

  • What’s new in HealthKit More detailed sleep and workout data. Save vision prescriptions. HealthKit query API supports Swift Async (iOS 15.4).

WeatherKit

  • Meet WeatherKit Build your own weather app. Access to Apple Weather Service for current, forecast and historical weather of a location. Use WeatherKit Swift framework or REST API. Must display attribution and Apple Weather logo.

CarPlay

Messages

Design

SF Symbols

Safari and Web

System Services

Audio and Video

SharePlay

MusicKit

ScreenCaptureKit

Extended Dynamic Range

Other Audio and Video Sessions

Augmented Reality

Machine Learning

Vision