Swift sample architecture
Source-backed, high-level architecture notes for Apple sample-code pages grouped in the Swift folder.
- Catalog module labels:
Swift,swift - Coverage: 5 / 5 sample pages documented
- Source policy: archive hashes and extracted-tree references are verified locally before analysis
Samples
| Sample | Platforms | High-level architecture | Documented patterns |
|---|---|---|---|
| Calling APIs Across Language Boundaries | macOS | A C++, C/Objective-C header, Objective-C++, Swift sample with the source-visible chain SwiftCppInteroperabilityShowcaseApp → ContentView → SwiftUI APIs. |
— |
| Code-along: Elevating an app with Swift concurrency | iOS, iPadOS, Mac Catalyst | A Swift sample bundle with entry-bearing project variants End, Start, each leading to SwiftUI APIs. |
Model-View-ViewModel, Actor-isolated state |
| Mixing Languages in an Xcode project | macOS | A C++, C/Objective-C header, Swift sample with the source-visible chain Swift_and_Cplusplus_mixed_FibonacciFrameworkApp → FibonacciView → SwiftUI APIs. |
— |
| Updating an app to use strict concurrency | iOS, iPadOS, Mac Catalyst, watchOS | A Swift sample bundle with entry-bearing project variants Original, Updated, each leading to SwiftUI APIs. |
View-controller organization, Protocol-oriented abstraction, Delegate or data-source callbacks, Central store, SwiftUI environment injection, Publisher-backed observable state |
| Updating an App to Use Swift Concurrency | iOS, iPadOS, watchOS | A Swift sample bundle with entry-bearing project variants Starting Point, Updated, each leading to SwiftUI APIs. |
View-controller organization, Delegate or data-source callbacks, Central store, SwiftUI environment injection, Publisher-backed observable state, Actor-isolated state |
Cross-sample signals
Recurring documented patterns
| Pattern label | Sample documents |
|---|---|
| Actor-isolated state | 2 |
| View-controller organization | 2 |
| Delegate or data-source callbacks | 2 |
| Central store | 2 |
| SwiftUI environment injection | 2 |
| Publisher-backed observable state | 2 |
Type-role naming evidence
Counts below are declaration-name suffixes, not inferred patterns.
| Role suffix | Distinct declarations across samples |
|---|---|
View |
10 |
Controller |
6 |
App |
5 |
Delegate |
4 |
Store |
2 |
Processor |
1 |
ViewModel |
1 |
Swift access-control evidence
These are declaration occurrences in scanned Swift source, including implicit internal declarations.
| Access level | Occurrences |
|---|---|
implicit internal |
887 |
private |
201 |
public |
107 |
fileprivate |
4 |
internal |
4 |
private(set) |
3 |
References
Generated from the verified local catalog and completed Markdown documents.