Multi-User AR on iOS 12: How Shared AR Games Work

Multi-user augmented reality (AR) on iOS 12 allows multiple players to interact in the same physical space by synchronizing digital objects across separate devices. Introduced with Apple's ARKit 2, this capability relies on mapping the physical environment, sharing spatial data across a local network, relocalizing each device to a common coordinate system, and continuously synchronizing real-time game interactions.

Spatial Mapping with ARWorldMap

The foundation of a shared AR experience is the ARWorldMap object introduced in ARKit 2. As a host player moves their device, ARKit uses visual-inertial odometry—combining camera feeds and motion sensor data—to detect feature points, plane orientations, and lighting conditions in the room. This spatial data, along with any virtual anchors placed in the scene, is packaged into an ARWorldMap snapshot.

Network Transmission

Once the host creates the ARWorldMap, the data must be transferred to other devices. Developers typically use Apple’s MultipeerConnectivity framework, though any peer-to-peer or client-server networking solution (such as WebSockets) can be used. The host serializes the ARWorldMap into binary data and broadcasts it over local Wi-Fi or peer-to-peer Bluetooth to the guest devices.

Relocalization

After receiving the host's ARWorldMap, the guest device deserializes it and applies it to its own ARSession. The guest device must then "relocalize." The guest points their camera at the same physical features the host scanned—such as a specific table edge, rug pattern, or wall. ARKit compares the live camera feed with the feature points stored in the received map. Once a match is found, the guest device aligns its internal coordinate system with the host’s coordinate system.

Real-Time State Synchronization

After relocalization, both devices share the exact same spatial origin point (0,0,0). When the host places a virtual object at a specific coordinate, the guest device renders it in the exact same physical location.

Because the ARWorldMap is only shared once at the beginning of a session, ongoing gameplay is maintained through lightweight network packets. When a player moves a piece, shoots a projectile, or modifies the scene, the device broadcasts only the updated coordinates and state changes rather than the entire map. This keeps latency low and ensures smooth, real-time multiplayer interactions across all participating iOS 12 devices.