The Problem
Multiplayer AR typically requires each device to maintain its own spatial understanding, so when one player walks behind a wall, they disappear from everyone else's view. This repo demonstrates a shared-map approach where all devices localize against the same scanned space, letting players see each other's positions through physical obstacles.
What This Does
This is a demo iOS app (Multiset-RayBan-Tracking/) that pairs with a Unity-based host application using the MultiSet VPS SDK. The iOS side handles the "client" role: it localizes the device in a pre-scanned space, streams its pose, and renders other players' positions. The MultipeerManager.swift service handles device-to-device communication, while LocalizationService.swift manages the VPS localization flow.
The repo contains 43 Swift files organized into Models/, Services/, ViewModels/, and Views/. The Views/ directory is the largest, with 20 files covering everything from the main feature selection screen to the multiplayer demo view. Navigation audio and map rendering are also included, suggesting this is meant as a complete reference implementation rather than a minimal SDK sample.
How It Is Wired
The app entry point is MultisetRayBanTrackingApp.swift, which loads MainAppView.swift. From there, FeatureSelectionView.swift offers three modes: localization demo, navigation, and multiplayer. The multiplayer flow routes through MultiplayerDemoView.swift (638 lines—the largest file), which coordinates between MultipeerManager.swift for pose exchange and LocalizationService.swift for spatial positioning.
The data flow is straightforward: LocalizationService gets a pose from the VPS, MultipeerManager broadcasts it over the local network, and each device renders avatars via MapCanvasView.swift and InteractiveMapView.swift. The NavigationMapViewModel.swift handles the turn-by-turn logic, pulling route data from bundled JSON files in Resources/NavigationData/.
What this code touches externally: the MultiSet VPS API (via LocalizationService), local network sockets (via MultipeerManager), and the device camera/AR session. The NavigationDataService.swift reads local JSON route files rather than hitting a remote server.
How To Use It
This is an Xcode project. Open Multiset-RayBan-Tracking/MultisetRayBanTracking.xcodeproj in Xcode and build to a physical iPhone—the AR and camera features won't work in the simulator.
open Multiset-RayBan-Tracking/MultisetRayBanTracking.xcodeproj
Configuration lives in Info.plist (camera and network permissions) and LocalizationConfig.swift (API keys and MultiSet map IDs). You'll need to supply your own MultiSet credentials and a pre-scanned map of your space. The README notes this pairs with a Unity host app from the MultiSet SDK, but that Unity project isn't in this repository.
Real-World Use
This is a demonstration of shared spatial awareness. Two people in the same room, each with the app, can see each other's avatars through walls. The practical application is team coordination in indoor spaces—think warehouse operations, event staff, or emergency response where knowing teammate positions matters. The Ray-Ban integration adds a hands-free client option, but the core flow works with just two phones.
Code Health & Issues
Static analysis found 19 issues across 4 categories. The most significant:
- High - Deep nesting -
MapPreviewCard.swift,FullScreenMapView.swift, andLocalizationDemoView.swifthave control flow nested 8 levels deep. These need early returns and extraction. - High - Duplicated code - 170 repeated 6-line blocks across 12 files, particularly in
MapCanvasView.swiftandPOIListView.swift. Shared helpers should be extracted. - Medium - Oversized file -
MultiplayerDemoView.swiftat 638 lines mixes view logic, state management, and networking. - Medium - High branching density -
AppFeature.swift,LocalizationResponse.swift, andNavigationInstruction.swifthave 17 branch points over 47 lines.
SDLC gaps: no test files exist across 43 source files, and there's no CI configuration. Any change ships without automated verification. A license is present, but no lockfile or Dockerfile.
The Bottom Line
This is a credible demo of MultiSet's spatial computing capabilities, with working multiplayer pose sharing and wall-occlusion rendering. The code is functional but unpolished—deep nesting and duplication make it harder to modify than it should be. Worth studying if you're evaluating MultiSet's SDK, but expect to refactor before production use.