Collection

Foundation Models sample architecture

Source-backed, high-level architecture notes for Apple sample-code pages grouped in the Foundation Models folder.

  • Catalog module label: Foundation Models
  • Coverage: 3 / 3 sample pages documented
  • Source policy: archive hashes and extracted-tree references are verified locally before analysis

Samples

Sample Platforms High-level architecture Documented patterns
Adding intelligent app features with generative models iOS, iPadOS, Mac Catalyst, macOS, visionOS A Swift sample with the source-visible chain FoundationModelsTripPlannerApp → LandmarksView → FoundationModels APIs. —
Generate dynamic game content with guided generation and tools iOS, iPadOS, Mac Catalyst, macOS A Swift sample with the source-visible chain FoundationModelsCoffeeGameApp → MainMenuView → DialogEngine → FoundationModels APIs. Protocol-oriented abstraction
Origami: Crafting a dynamic tutorial for Apple Intelligence iOS, iPadOS, Mac Catalyst, macOS SwiftUI over SwiftData. Each open project gets one Orchestrator that owns a single LanguageModelSession and four feature models (BrainstormModel, TutorialGenerationModel, CoachModel, TermModel). Views send typed OrchestratorEvents. A reduce step returns OrchestratorEffects that run in one cancellable task. Reducer-style event dispatch, SwiftUI environment injection, Binding-based state propagation

Cross-sample signals

Recurring documented patterns

Pattern label Sample documents

Type-role naming evidence

Counts below are declaration-name suffixes, not inferred patterns.

Role suffix Distinct declarations across samples
View 38
Model 7
App 3
Engine 2
Generator 1
Scene 1
Recorder 1
Renderer 1
Store 1

Swift access-control evidence

These are declaration occurrences in scanned Swift source, including implicit internal declarations.

Access level Occurrences
implicit internal 1340
private 259
private(set) 13
internal 2

References

Generated from the verified local catalog and completed Markdown documents.