App Intents sample architecture
Source-backed, high-level architecture notes for Apple sample-code pages grouped in the App Intents folder.
- Catalog module label:
App Intents - Coverage: 7 / 7 sample pages documented
- Source policy: archive hashes and extracted-tree references are verified locally before analysis
Samples
| Sample | Platforms | High-level architecture | Documented patterns |
|---|---|---|---|
| Accelerating app interactions with App Intents | iOS, iPadOS, Mac Catalyst, macOS, visionOS, watchOS | A SwiftUI trail app exposes thin intent/entity adapters over observable managers and value models. | Dependency injection, Entity adapter, Repository, Router, Strategy protocol, Multi-target |
| Adopting App Intents to support system experiences | iOS, iPadOS, Mac Catalyst, macOS | Host app and widget consume a three-layer Swift package: Snippets → Intents → Core. |
Layered package, Dependency injection, Shared store, Entity adapter, Multi-target |
| Defining your app’s Focus filter | iOS, iPadOS, Mac Catalyst | A host SwiftUI app and App Intents extension compile shared models/entities/repository and communicate through app-group UserDefaults. | App extension, Repository, Shared store, Entity query, View model |
| Integrating your calendar app with Apple Intelligence | iOS, iPadOS, Mac Catalyst | One SwiftUI/SwiftData app with a main-actor CalendarManager shared by views, entity queries, and intents. |
Repository, Entity adapter, Dependency injection, Router, Schema intent |
| Integrating your messaging app with Apple Intelligence | iOS, iPadOS, Mac Catalyst, macOS | One SwiftUI/SwiftData app with an actor-isolated data owner, a main-actor navigation owner, and thin App Intent adapters. | Composition root, Dependency injection, Repository, Entity adapter, Router, Per-key session sharding |
| Integrating your music app with Apple Intelligence | iOS, iPadOS, Mac Catalyst | A manager-oriented SwiftUI/SwiftData app plus a widget extension for a Home Screen widget and Live Activities. | Composition root, Subsystem controller, Dependency injection, Protocol adapter, Weak back-reference, Multi-target architecture |
| Integrating your photo app with Apple Intelligence | iOS, iPadOS, Mac Catalyst, macOS | One SwiftUI app wraps PhotoKit with an observable media-library facade, an actor image cache, and a navigation state owner. | Composition root, Repository facade, Entity adapter, Router, Actor service, Schema intent |
Cross-sample signals
Recurring documented patterns
| Pattern label | Sample documents |
|---|---|
| Dependency injection | 5 |
| Entity adapter | 5 |
| Repository | 4 |
| Router | 4 |
| Composition root | 3 |
| Multi-target | 2 |
| Shared store | 2 |
| Schema intent | 2 |
Type-role naming evidence
Counts below are declaration-name suffixes, not inferred patterns.
| Role suffix | Distinct declarations across samples |
|---|---|
View |
84 |
Manager |
21 |
Model |
7 |
App |
6 |
Provider |
4 |
Engine |
2 |
Controller |
2 |
Renderer |
2 |
Session |
2 |
Tracker |
1 |
Store |
1 |
Repository |
1 |
ViewModel |
1 |
Builder |
1 |
Swift access-control evidence
These are declaration occurrences in scanned Swift source, including implicit internal declarations.
| Access level | Occurrences |
|---|---|
implicit internal |
3980 |
private |
648 |
public |
464 |
private(set) |
9 |
fileprivate |
4 |
References
Generated from the verified local catalog and completed Markdown documents.