Demo Library
Minimal, focused Swift demos for every tracked iOS 27 capability.
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.
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.
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.
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.
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.