Collection

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 Swift sample with the source-visible chain AppIntentsSampleApp → ContentView → AccountManager → LocationOptionsProvider → AppIntents APIs. Protocol-oriented abstraction
Adopting App Intents to support system experiences iOS, iPadOS, Mac Catalyst, macOS A Swift sample with the source-visible chain AppIntentsTravelTracking → ContentView → SharedDataStore → GalleryTimelineProvider → AppIntents APIs. Protocol-oriented abstraction, Delegate or data-source callbacks, Central store, Binding-based state propagation, Actor isolation
Defining your app’s Focus filter iOS, iPadOS, Mac Catalyst A Swift sample bundle with entry-bearing project variants ExampleAppIntentsExtension, ExampleChatApp, each leading to AppIntents APIs. Model-View-ViewModel, Repository
Integrating your calendar app with Apple Intelligence iOS, iPadOS, Mac Catalyst A SwiftUI app whose views and App Intents both route data work through one @MainActor @Observable CalendarManager singleton that owns the SwiftData container and a Spotlight index. Singleton, Observable state owner, App Intents dependency injection
Integrating your messaging app with Apple Intelligence iOS, iPadOS, Mac Catalyst, macOS A Swift sample with the source-visible chain UnicornChatApp → ContactView → ContactManager → AppIntents APIs. Delegate or data-source callbacks, Actor isolation
Integrating your music app with Apple Intelligence iOS, iPadOS, Mac Catalyst CosmoTunesApp is the composition root. It builds every manager once, wires their cross-references, registers them with AppDependencyManager for intents and queries, and injects the observable ones into the SwiftUI environment. ModelManager owns SwiftData and mirrors entity changes into Spotlight. SwiftUI environment injection, Protocol-oriented abstraction, Actor isolation
Integrating your photo app with Apple Intelligence iOS, iPadOS, Mac Catalyst, macOS PhotosDomainExample creates one MediaLibrary and one NavigationManager, injects both into SwiftUI through environment and into App Intents through AppDependencyManager. Observable state owner, SwiftUI environment injection, App Intents dependency injection, Actor isolation, Callback-to-async continuation bridge

Cross-sample signals

Recurring documented patterns

Pattern label Sample documents
Actor isolation 4
Protocol-oriented abstraction 3
Delegate or data-source callbacks 2
Observable state owner 2
App Intents dependency injection 2
SwiftUI environment injection 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 3969
private 645
public 464
private(set) 9
fileprivate 4

References

Generated from the verified local catalog and completed Markdown documents.