WWDC23

View sample code referenced in the WWDC23 session videos.

Featured
  • Backyard Birds: Building an app with SwiftData and widgets

    Create an app with persistent data, interactive widgets, and an all new in-app purchase experience.

    iOS macOS watchOS Xcode iPadOS

    View code
Accelerate
  • Training a neural network to recognize digits

    Build a simple neural network and train it to recognize randomly generated numbers.

    macOS

    View code
Audio & Video
  • ShazamKit Dance Finder with Managed Session

    Find a video of dance moves for a specific song by matching the audio to a custom catalog, and show a history of recognized songs.

    iOS

    View code
  • Playing and editing Cinematic mode video

    Play and edit Cinematic mode video with an adjustable depth of field and focus points.

    macOS

    View code
Augmented Reality
  • Providing custom models for captured rooms and structure exports

    Enhance the look of an exported 3D model by substituting object bounding boxes with detailed 3D renditions.

    iOS Xcode

    View code
  • Merging multiple scans into a single structure

    Export a 3D model that consists of multiple rooms captured in the same physical vicinity

    iOS Xcode

    View code
Calendar
  • Accessing Calendar using EventKit and EventKitUI

    Choose and implement the appropriate Calendar access level in your app.

    iOS

    View code
CryptoKit
  • Performing Common Cryptographic Operations

    Use CryptoKit to carry out operations like hashing, key generation, and encryption.

    View code
Developer Tools
  • SlothCreator: Building DocC Documentation in Xcode

    Build DocC documentation for a Swift package that contains a DocC Catalog.

    View code
Foundation
  • Building a resumable upload server with SwiftNIO

    Support HTTP resumable upload protocol in SwiftNIO by translating resumable uploads to regular uploads.

    View code
Graphics & Games
  • Downloading essential assets in the background

    Fetch the assets your app requires before its first launch using an app extension and the Background Assets framework.

    iOS macOS

    View code
  • Achieving smooth frame rates with Metal’s display link

    Pace rendering with minimal input latency while providing essential information to the operating system for power-efficient rendering, thermal mitigation, and the scheduling of sustainable workloads.

    iOS macOS tvOS

    View code
  • Customizing a PyTorch operation

    Implement a custom operation in PyTorch that uses Metal kernels to improve performance.

    View code
  • Filtering Images with MPSGraph FFT Operations

    Filter an image with MPSGraph fast Fourier transforms using the convolutional theorem.

    macOS

    View code
GroupActivities
  • Drawing content in a group session

    Invite your friends to draw on a shared canvas while on a FaceTime call.

    iOS

    View code
Health & Fitness
  • Building a multidevice workout app

    Mirror a workout from a watchOS app to its companion iOS app, and perform bidirectional communication between them.

    iOS watchOS

    View code
  • Customizing workouts with WorkoutKit

    Create, preview, and sync workout structures for use in the Workout app on Apple Watch.

    iOS iPadOS Xcode

    View code
iCloud & Data
  • Visualizing your app’s data

    Build complex and interactive charts using Swift Charts.

    iOS

    View code
Machine Learning
  • Recognizing speech in live audio

    Perform speech recognition on audio coming from the microphone of an iOS device.

    iOS macOS

    View code
macOS
  • Running macOS in a virtual machine on Apple silicon

    Install and run macOS in a virtual machine using the Virtualization framework.

    macOS

    View code
Maps & Location
  • Adopting live updates in Core Location

    Simplify location delivery using asynchronous events in Swift.

    iOS

    View code
  • Integrating the Apple Maps Server API into Java server applications

    Streamline your app’s API by moving georelated searches from inside your app to your server.

    View code
  • Monitoring location changes with Core Location

    Define boundaries and act on user location updates.

    iOS

    View code
Photo & Camera
  • Supporting Continuity Camera in your tvOS app

    Capture high-quality photos, video, and audio in your Apple TV app by connecting an iPhone or iPad as a continuity device.

    tvOS

    View code
  • AVCam: Building a Camera App

    Capture photos with depth data and record video using the front and rear iPhone and iPad cameras.

    iOS

    View code
  • Implementing an inline Photos picker

    Embed a system-provided, half-height Photos picker into your app’s view.

    iOS

    View code
Swift & SwiftUI
  • Focus Cookbook: Supporting and enhancing focus-driven interactions in your SwiftUI app

    Create custom focusable views with key-press handlers that accelerate keyboard input and support movement, and control focus programmatically.

    iOS macOS Xcode iPadOS

    View code
SwiftData
  • Managing model data in your app

    Create connections between your app’s data model and views.

    iOS macOS Xcode

    View code
  • Monitoring data changes in your app

    Show changes to data in your app’s user interface by using observable objects.

    iOS macOS Xcode

    View code
  • Migrating from the Observable Object protocol to the Observable macro

    Update your existing app to leverage the benefits of Observation in Swift

    iOS macOS Xcode iPadOS

    View code
  • Adopting SwiftData for a Core Data app

    Persist data in your app intuitively with the Swift native persistence framework.

    iOS

    View code
  • Building a document-based app using SwiftData

    Code along with the WWDC presenter to transform an app with SwiftData.

    iOS macOS Xcode iPadOS

    View code
UIKit
  • Implementing Modern Collection Views

    Bring compositional layouts to your app and simplify updating your user interface with diffable data sources.

    iOS macOS

    View code
  • Supporting desktop-class features in your iPad app

    Enhance your iPad app by adding desktop-class features and document support.

    iOS Mac Catalyst

    View code
  • Supporting HDR images in your app

    Load, display, edit, and save HDR images using SwiftUI and Core Image.

    iOS macOS

    View code
Vision
  • Detecting animal body poses with Vision

    Draw the skeleton of an animal by using Vision’s capability to detect animal body poses.

    iOS

    View code
  • Detecting human body poses in 3D with Vision

    Render skeletons of 3D body pose points in a scene overlaying the input image.

    iOS

    View code
Wallet
  • Checking IDs with Tap to Present ID on iPhone

    Read and verify mobile driver’s license information without any additional hardware.

    iOS Xcode

    View code
Widgets
  • Emoji Rangers: Supporting Live Activities, interactivity, and animations

    Offer Live Activities, animate data updates, and add interactivity to widgets.

    iOS watchOS

    View code
  • Updating your app and widgets for watchOS 10

    Integrate SwiftUI elements and watch-specific features, and build widgets for the Smart Stack.

    iOS macOS watchOS Xcode

    View code