Nearby Interaction sample architecture
Source-backed, high-level architecture notes for Apple sample-code pages grouped in the Nearby Interaction folder.
- Catalog module label:
Nearby Interaction - Coverage: 4 / 4 sample pages documented
- Source policy: archive hashes and extracted-tree references are verified locally before analysis
Samples
| Sample | Platforms | High-level architecture | Documented patterns |
|---|---|---|---|
| Finding devices with precision | iOS, iPadOS, Mac Catalyst | A Swift sample with the source-visible chain NIJetpackApp → NIContentView → Coordinator → MPCSession → NearbyInteraction APIs. |
Delegate or data-source callbacks, Coordinator, Publisher-backed observable state, Actor-isolated state |
| Implementing interactions between users in close proximity | iOS, iPadOS, Mac Catalyst | A Swift sample with the source-visible chain AppDelegate → ViewController → MPCSession → NearbyInteraction APIs. |
View-controller organization, Delegate or data-source callbacks |
| Implementing proximity-based interactions between a phone and watch | iOS, iPadOS, Mac Catalyst, watchOS | A Swift sample with the source-visible chain WatchNIDemoApp → ContentView → NearbyInteractionManager → NearbyInteraction APIs. |
Delegate or data-source callbacks, Publisher-backed observable state |
| Implementing spatial interactions with third-party accessories | iOS, iPadOS, Mac Catalyst | A Swift sample with the source-visible chain AppDelegate → AccessoryDemoViewController → TransferService → NearbyInteraction APIs. |
View-controller organization, Delegate or data-source callbacks, Service object |
Cross-sample signals
Recurring documented patterns
| Pattern label | Sample documents |
|---|---|
| Delegate or data-source callbacks | 4 |
| Publisher-backed observable state | 2 |
| View-controller organization | 2 |
Type-role naming evidence
Counts below are declaration-name suffixes, not inferred patterns.
| Role suffix | Distinct declarations across samples |
|---|---|
View |
5 |
Delegate |
4 |
App |
2 |
Manager |
2 |
Session |
2 |
Controller |
2 |
Coordinator |
1 |
Service |
1 |
Swift access-control evidence
These are declaration occurrences in scanned Swift source, including implicit internal declarations.
| Access level | Occurrences |
|---|---|
implicit internal |
366 |
private |
33 |
internal |
18 |
References
Generated from the verified local catalog and completed Markdown documents.