Demo Library
Minimal, focused Swift demos for every tracked iOS 27 capability.
Membership Pass with Featured Action
Demonstrates building a Poster Generic membership pass with a PDF417 barcode and a featuredActions entry using the Pass Builder Swift package on a server or Mac target.
CarPlay Video Browser with Card Thumbnails
Shows how to build a CarPlay video browsing list using the new CPCardElement API with thumbnail overlays and playback progress, and how to check session configuration for video support.
MDM Declarative Status Subscriber
Demonstrates how an MDM client app subscribes to declarative status items — including the new device system health and Lockdown Mode status items introduced in iOS 27 — and displays the reported values using the ManagedApp framework.
App Attest Key Generation & Attestation
Shows how to generate an App Attest key, request an attestation, and then inspect the raw authenticator data to find the new iOS 27 extensions (launch validation category and bundle version).
Peer-to-Peer Payment Scam Guard
Demonstrates requesting a coaching-risk insight before confirming a large payment, then adjusting the UI based on the risk level returned and submitting mandatory consumption feedback.
Daily Metric & Diagnostic Monitor
Subscribes to MetricKit's new async streams at app launch, printing peak memory per interval and logging crash diagnostics with their new termination category to the console.
Accessory Distance Finder
Demonstrates starting a Core Bluetooth Channel Sounding session with a paired peripheral and reading real-time distance measurements via the delegate callback.
Automated Virtual Mac Provisioner
Demonstrates how to start a new virtual Mac with automated guest provisioning — creating a user account with auto-login and SSH enabled — using the new VZMacGuestProvisioningOptions API in macOS 27.
Swift Package Build & Run via Container Machine
Shows the shell commands and Swift Package Manager workflow for compiling and running a Vapor server inside a container machine, demonstrating the automatic filesystem sharing and network access pattern described in the session.
Team Subscription Checkout
Demonstrates how to initiate a multi-seat group purchase using StoreKit 2 by passing a quantity into the purchase options, then handling the resulting transaction to grant access to the purchaser.
Retention Offer Transaction Checker
Demonstrates how to detect a redeemed retention offer (offerType 5) in a StoreKit transaction, and surface that information in a SwiftUI view so developers can validate their Retention Messaging integration.
App Store Connect API — Upload Creative Asset
Demonstrates how to upload a creative asset to the App Store Connect Asset Library using the App Store Connect REST API from a Swift command-line tool, then polls for its status.
Branded Product Picker
Demonstrates a WKWebView-hosted HTML page that uses the new `appearance: base-select` CSS to render a fully custom-styled select control with images and subtext inside each option.
Masonry Photo Feed in WKWebView
Loads an inline HTML page into a WKWebView that uses CSS Grid Lanes (display: grid-lanes) to render a waterfall photo grid — demonstrating the new layout mode available in Safari 26 on iOS 27.
3D Product Viewer with Safari Model Element
A WKWebView-based SwiftUI wrapper that loads an inline HTML page using the native <model> element to display a USDZ file with orbit interaction and an AR Quick Look fallback link.
Mail-style Bottom Toolbar Search
Demonstrates the new iOS 27 bottom-toolbar search placement where the field animates over the keyboard, combined with a scope bar for filtering results across mailboxes.
Branded Content Layer with Liquid Glass Navigation
Demonstrates the iOS 27 Liquid Glass layering pattern: brand color lives in the scrollable content area while native tab bar and toolbar float above, dynamically picking up the accent color.
Adaptive tvOS Content Card
Demonstrates a content card that switches between a horizontal and vertical stack layout depending on the active Dynamic Type size, preventing text truncation at larger accessibility sizes.
Linked Paragraph Reader
A paginated travel guide view that links two SwiftUI selectable Text views so VoiceOver navigates line-by-line across both paragraphs without interruption, and adds a Save Selection custom action to the edit rotor.
Workout Zone Summary Viewer
Fetches the most recent completed workout from HealthKit and displays the time spent in each heart rate zone alongside the zone boundaries, demonstrating the new zoneGroupsByType API.
Comic Panel Template Editor
Demonstrates creating a PaperKit canvas with programmatically added read-only shape elements and interactive adornments that float above the canvas without becoming part of the saved document.
Auto-Framing Selfie Camera
Demonstrates setting up the Center Stage front camera with dynamic aspect ratio and observing the AVCaptureSmartFramingMonitor to automatically apply face-aware zoom and rotation recommendations.
Handwriting Checker
A SwiftUI view that lets the user draw on a PKCanvasView and taps a button to recognize what was written using PKStrokeRecognizer, displaying the result below the canvas.
Ambient Sound Now-Playing Card
Shows how to conform a player model to MediaSessionRepresentable so that an ambient-sound app appears on the Lock Screen, Control Center, and Dynamic Island with play/pause and skip controls.
Beat & Key Analyzer
Loads a local audio file, runs Music Understanding analysis, and displays the detected key signature and BPM alongside a list of beat timestamps.
Workout Music Picker & Player
Demonstrates selecting multiple songs via the new .musicPicker modifier and playing them with ApplicationMusicPlayer, showing live artwork and playback controls.
High-Res Fast Capture Camera
Configures an AVCaptureSession for 48MP photo output with fast capture prioritization and deferred processing enabled, then fires a capture with pre-allocated resources to keep the shutter snappy.
RAW 9 Interactive Editor
Loads a RAW file using CIRAWFilter, opts into the RAW 9 decoder, and renders it into a SwiftUI view with a live exposure slider that benefits from Core Image's intermediate caching.
Subtitle Style Previewer
Shows how to fetch system caption style profiles and use the new AVPlayerLayer API to display a live style preview during playback, then commit the chosen style.
Incoming Audio Conversation with LiveCommunicationKit
Shows how to create a ConversationManager, decode a PushKit payload, report an incoming conversation, and handle the JoinConversationAction in the single delegate callback.
Postcard Image Creator
A greeting card app that seeds the Image Playground sheet with the card's theme and message, then displays the resulting image as the card's artwork.
Fast Camera Launch with Deferred Start
Demonstrates configuring AVCaptureSession with deferred start so only the preview layer initializes at launch, while the photo output initializes in the background after preview appears.
Localized Asset Pack Manifest Integration
Shows how to add a language tag to a Background Assets manifest JSON and programmatically check whether a required localized asset pack is available before serving in-game content.
Metal 4 Residency Set & GPU Frame Capture (GPTK 4 Pattern)
Demonstrates the two most critical Metal 4 patterns taught by GPTK 4 agentic skills: registering resources in a residency set before GPU use, and invoking the new gpucapture CLI tool from Swift for autonomous agent-driven frame capture.
Touch Game Controller Setup
Demonstrates how to create a TCTouchController, add a contextual action button with a system SF Symbol, expand a thumbstick to cover the full left half of the screen, and forward UIKit touch events — all wiring into the existing GCController pipeline.
Game Level State Reporter
Demonstrates how to create a StateReporting domain that tracks level transitions and player position, annotating Metal performance traces with structured game context.
Foveated Streaming Receiver
A minimal visionOS app that creates a FoveatedStreamingSession, connects to a nearby streaming endpoint, and presents the streamed OpenXR content inside a progressive ImmersiveSpace alongside a native SwiftUI control window.
Alchemist Animator — Blend Idle & Walk via Animation Graph
Shows how to load a RealityKit scene containing an Animation Graph and toggle the 'isWalking' boolean parameter from Swift to drive character animation state transitions at runtime.
Alchemy Lab Scene with Lightmap and Prototype Instancing
Shows how to load a RealityKit scene built in Reality Composer Pro 3 that uses a LightmapComponent for baked indirect lighting, and how to programmatically override a prototype instance's component values at runtime.
Cauldron Water Level Plugin
Demonstrates a minimal Reality Composer Pro 3 plugin that registers a custom ECS component and system so artists can drag a waterLevel slider in the editor and see the cauldron surface move in real time.
Theater Seat Immersive Preview
Demonstrates how a SwiftUI WKWebView host can load a locally served webpage that uses the HTML model element and requestImmersive() to show a 3D theater environment, and how the native layer observes the immersive state change message posted back from JavaScript.
Metric-Space Object Pose Measurement
Demonstrates loading a reference object with high frame rate tracking enabled on visionOS and querying its metric-space pose for accurate spatial measurement, plus the equivalent iOS ARKit session setup.
Soft Shadow Planetarium Spotlight
Demonstrates attaching a soft shadow to a spotlight and enabling physical space lighting so the virtual light illuminates real-world surfaces with a projective texture.
USD Scene Composer
Opens an existing USD stage, adds a referenced asset as a new transform prim, moves it into position, applies accessibility metadata, then exports a compressed package — demonstrating USDKit's core load-modify-export loop.
Immersive Rendering Gallery
A macOS SwiftUI app that launches an Apple Immersive Video frame on a connected Vision Pro and lets the user cycle through multiple renderings within the same QuickLook scene using DocumentPreviewSession.
Draggable Physics Nut — RealityKit + Script Graph Companion Code
Shows the RealityKit Swift-side setup that backs a Reality Composer Pro 3 Script Graph scene: loading the .usda, adding InputTarget, Collision, HoverEffect, and PhysicsBody components to an entity so the Script Graph's On Drag and Add Force nodes have everything they need to run.
Layered Immersive Environment Viewer
Loads a custom USDZ environment mesh and panoramic sky texture into a RealityKit ImmersiveSpace, demonstrates per-layer spatial audio attachment and environment-driven IBL lighting.
AirPods Assembly Disassembler
Loads a hierarchical 3D model and toggles between treating it as one manipulable object versus individually grabbable sub-parts by relocating ManipulationComponent and InputTargetComponent through the entity tree, then applies a ClippingComponent to reveal the interior.
Scanned Plant Viewer
Loads a pre-captured Gaussian splat of a potted plant and renders it in a RealityKit ImmersiveSpace, allowing the user to walk around and inspect the photorealistic scanned object.
Immersive Video Live Recorder
Demonstrates how to record a live Apple Immersive Video ProRes stream to a QuickTime MOV file using AVAssetWriter, including setting the required kVTProjectionKind_AppleImmersiveVideo compression property so the output file carries correct stereo immersive metadata.
SwiftUI Menu & Gesture in AppKit App
Demonstrates NSGestureRecognizerRepresentable to attach a custom force-click recognizer to a SwiftUI view, and NSHostingMenu to add a SwiftUI-powered submenu with a keyboard shortcut to an existing AppKit main menu.
Adaptive Navigation Bar & Sidebar Tab Demo
Shows how to opt an iPhone UITabBarController into sidebar mode, set a prominent tab, and configure navigation bar minimization — all using new iOS 27 APIs.
AppKit State Restoration Demo
Demonstrates NSWindowRestoration with encodeRestorableState and restoreState so a sidebar selection survives app quit and relaunch on macOS 27.
Line Number Gutter in a UITextView Subclass
Shows how to subclass UITextView in iOS 27, override the new viewport layout delegate methods, and render paragraph line numbers in a side gutter by reading NSTextLayoutFragment bounds during each layout cycle.
Animated Domain-Warp Background
Applies a time-driven layerEffect Metal shader to a SwiftUI Image, producing a flowing organic warp animation. The TimelineView fires every animation frame and passes elapsed time into the shader so the warp moves continuously.
Card Pile Reorder & Multi-Drag
Demonstrates the new reorderable and reorderContainer modifiers to reorder cards across multiple piles, plus dragContainer for lifting a stack of cards together.
Landmark App String Catalog Setup
Shows the recommended Swift source patterns that make strings fully discoverable by Xcode's localization agent, including plural variants and a custom table, so the agent can translate them with full context.
OSSignpost Lasso Interval Tracker
Demonstrates how to annotate a performance-sensitive code path with OSSignpost so Instruments 27 can surface it in the Points of Interest track, enabling filtered Run Comparisons and Top Functions analysis on just that workflow.
Cross-Framework Helper Migration
Shows a shared assertion helper being updated from XCTFail to Issue.record so it works correctly in both XCTest and Swift Testing tests under Xcode 27's Complete interoperability mode.
Simulating Bug Reproduction with SimCtl
Demonstrates how to use the xcrun simctl command-line interface — the underlying engine Device Hub builds on — to programmatically mirror key Device Hub configuration steps: setting a simulated location and changing the content size category on a booted simulator.
Agentic Brainstorm Debugger
Demonstrates how a DynamicInstructions setup with two tools is structured so Instruments can capture both tool registrations and the switchToTutorialMode transition — the exact pattern shown in the WWDC session.
Book Club Multi-Variation Prototype
Demonstrates how to structure SwiftUI previews so a single file shows multiple named design variations side-by-side — the pattern coding agents in Xcode produce when asked for divergent UI directions.
Live Race Schedule with gRPC Swift
Demonstrates how to configure a shared gRPC client in the SwiftUI environment and call a generated unary RPC to fetch a race schedule from a local server, then update the view with the decoded Protobuf response.
Local LLM Chat with MLX-LM Server
A minimal SwiftUI view that sends a chat message to a locally running MLX-LM Server and streams the assistant reply using the OpenAI-compatible completions endpoint — no API key required.
Quantized Matrix Multiply with Metal TensorOps
Shows how to allocate an MTLTensor with a 4-bit integer data plane and an FP8 E8M0 scale plane on the host side, then dispatch a Metal compute pipeline that uses TensorOps to perform dequantized matrix multiplication entirely on the GPU.
GPU-Accelerated Curve Fitting with Automatic Differentiation
Demonstrates fitting a quadratic polynomial to noisy data points using MLX Swift's `grad` function transformation for automatic differentiation and a simple gradient descent loop — all running on the GPU.
Distributed LLM Cluster Launcher
Demonstrates how to configure a multi-node MLX cluster hostfile programmatically in Swift and launch a distributed language model inference job across four M3 Ultras using MLX's Swift API.
SAM3 Quantization & On-Device Inference
Shows the Core AI Python conversion pipeline: exporting a PyTorch model, applying a 4-bit weight compression preset with coreai-opt, and loading the resulting .aimodel for on-device inference — then loading it in a SwiftUI app via CoreML.
Soup of the Day – Persistent Soup Picker
Demonstrates how to expose an App Entity with rich properties so the Use Model action can reason about it, and how to implement a stable cross-device entity identifier required for Shortcuts Storage.
Interactive Object Segmenter
Demonstrates using GenerateIterativeSegmentationRequest to segment a tapped object in a photo, then refine the mask by adding a second point to include an adjacent object.
CometCal Intent Tester
Demonstrates how to use AppIntentsTesting to create a calendar via an App Intent, assert on the returned entity's properties, and verify an entity string query — all on-device without importing the app.
Book Tag Judge Alignment Evaluator
Demonstrates how to write an alignment evaluation that computes Cohen's kappa between a human expert's ratings and a ModelJudgeEvaluator's scores, enabling hill-climbing of a prompt used to generate book tags.
UnicornChat Message Donation & Ownership
Demonstrates donating a SendMessageIntent from the app UI so Apple Intelligence learns user preferences, and marking a shared conversation entity with OwnershipProvidingEntity so Siri confirms before updating it.
Book Tag Synthetic Data Generator
Demonstrates using SampleGenerator with a custom session provider and validation closure to expand a small seed dataset of book reviews into 100 synthetic samples, rejecting any that violate structural rules.
CometCal Event Entity with Siri
Demonstrates creating a schematized EventEntity using the calendar_event App Schema, conforming to IndexedEntity, and donating it to the Spotlight semantic index so Siri can answer questions about calendar events.
AI File Sorter Shell Script + Python Evaluation
Shows how to use the fm CLI to classify files as draft vs. final via structured JSON output in a shell script, then demonstrates the equivalent Python SDK session call for prototyping the same prompt in a notebook.
Custom Echo LLM Provider
Implements a minimal custom LanguageModel and LanguageModelExecutor conformance that echoes the user's prompt back, demonstrating the full provider contract: configuration, prewarm, and streaming respond.
Album Art Visual Search
Demonstrates registering an App Entity and IntentValueQuery so Visual Intelligence can search a local music catalog by image similarity using Vision feature prints, then open the matched album in-app.
Real-Time Metric & Diagnostic Monitor
A lightweight service that subscribes to MetricKit's new async streams at app launch, encodes incoming reports as JSON, and logs per-state memory and hitch data to the console — ready to forward to an analytics backend.
Book Club Reading Schedule Widget
Demonstrates adding the new systemExtraLargePortrait family to an existing WidgetKit widget, showing a reading schedule across multiple days in the new tall layout.
Tea Party Agent with Security Guardrails
Demonstrates how to build a Foundation Models agent with lifecycle event modifiers that intercept tool calls, gate financial actions behind user confirmation, and redact PII from prompt context before it reaches the model.
Trail Journal AI Assistant
Demonstrates adding SpotlightSearchTool to a LanguageModelSession so a user can ask natural-language questions about hiking trails their app has indexed in Core Spotlight, and shows how to recover full item metadata via the index delegate.
Standalone Swift File with SwiftUI Preview
Demonstrates the new Xcode 27 capability of opening a bare .swift file and getting live SwiftUI canvas previews without a full project, using the #Preview macro in a standalone context.
Batch Photo Tagger with EntityCollection
Demonstrates how to use EntityCollection as an App Intent parameter type to efficiently tag thousands of photos by ID without resolving full entity objects, resulting in near-instant execution compared to the old array-based approach.
UnicornChat Send Message via Siri
Demonstrates conforming a messaging action to the sendMessage App Schema so Siri can send messages on behalf of the user entirely through natural language, with no UI required.
SwiftData ResultsObserver Map Camera Controller
Demonstrates ResultsObserver in a non-SwiftUI class that recalculates map camera bounds whenever Trip data changes in the SwiftData store.
Swift 6.4 Highlights Sampler
Demonstrates three key Swift 6.4 additions in one file: anyAppleOS availability, Task.withCancellationShield for safe cleanup, and mapKeyedValues on Dictionary.
Adaptive Toolbar with Overflow and Pinned Share
Demonstrates the new iOS 27 toolbar APIs — visibilityPriority for keeping key actions visible, ToolbarOverflowMenu for secondary actions, and topBarPinnedTrailing for a always-visible Share button — in a resizable SwiftUI view.
Book Tag Quality Evaluator
Demonstrates building an Evaluation that measures whether a BookTaggingService generates an appropriate number of tags (3–8), aggregates results across multiple samples, and asserts an 80% pass rate using Swift Testing.
Vocab Card Generator with Custom On-Device LLM
Shows how to load a custom Core AI language model bundle and use the standard FoundationModels LanguageModelSession to generate structured vocabulary card data — same API as Apple Intelligence, but powered by your own model.
On-Device Direction Predictor
Loads a converted .aimodel file, prepares an NDArray of float32 features, runs inference on the Neural Engine via Core AI, and reads the output logits — all on-device with no network calls.
Custom Echo LLM Provider
Implements a minimal LanguageModel + LanguageModelExecutor conformance that echoes the user's prompt back, demonstrating how a real third-party provider would slot into the Foundation Models framework.
Craft Tutorial Orchestrator
Demonstrates a two-phase DynamicProfile session that brainstorms craft ideas using PrivateCloudComputeLanguageModel, then switches to SystemLanguageModel for in-progress technique review — showing the baton-pass pattern with a shared session property.
Live Scene Analyzer
Attaches a Visual Intelligence analyzer to a live camera feed and displays the top scene label and any detected text in real time using the new VisualIntelligence SwiftUI integration.
Delivery Tracker Dynamic Island
Demonstrates a Live Activity with an interactive 'Mark as Received' button in the compact Dynamic Island view, plus the new bottom region in the expanded presentation.
Liquid Glass Card Browser
A SwiftUI card list where each card uses the new .glassEffect() modifier to render a refractive glass surface over a colorful gradient background, demonstrating the core Liquid Glass material API.
Smart Task Creator
Demonstrates an App Intent that lets Siri create a task with natural-language due-date parsing and priority inference, using the new @AssistantIntent macro and ReturnsValue protocol introduced in iOS 27.
On-Device Recipe Suggester
Demonstrates using a Foundation Models session with a `@Generable` struct to ask the on-device LLM for a structured recipe suggestion, then displays the result in SwiftUI — no network required.