A client asked us to develop an AR app for collaborative interior viewing: two designers with iPads simultaneously placing furniture in a shared virtual space. Without synchronization, each saw a different set of objects, and the real room ended up in different coordinates. The solution — Collaborative Session from ARKit. But implementation turned out to be nontrivial: MultipeerConnectivity periodically lost connection, maps didn't merge, and objects jumped. Below — how we build a reliable multi-device AR session, what pitfalls we avoid, and what to consider before starting development. Development timelines and pricing are determined individually.
Collaborative Session allows multiple iOS devices to exchange spatial maps in real time. Unlike Cloud Anchors, the internet is not required — data is transmitted over the local network with latency under 20 ms. We implemented a project for a design studio where 3 participants synchronized with latency below 15 ms; server cost savings amounted to around $1500 per month. However, this technology only works on Apple devices and is sensitive to network quality.
How Collaborative Session Works
Activating Collaborative Session requires just one line in the configuration:
let config = ARWorldTrackingConfiguration()
config.isCollaborationEnabled = true
arView.session.run(config)
After that, ARKit generates ARSession.CollaborationData packets — information about the device's environment. These need to be sent to all participants via a suitable transport: MultipeerConnectivity, WebSocket, or GameKit.
func session(_ session: ARSession, didOutputCollaborationData data: ARSession.CollaborationData) {
let encoded = try? NSKeyedArchiver.archivedData(withRootObject: data, requiringSecureCoding: true)
// send encoded to all peers
}
// On the receiving side:
let data = try? NSKeyedUnarchiver.unarchivedObject(ofClass: ARSession.CollaborationData.self, from: received)
session.update(with: data)
After 10–30 seconds, devices merge their maps — all participants get a unified coordinate system.
Why Collaborative Session Is Faster than Cloud Anchors
Collaborative Session is a direct alternative to Cloud Anchors. Here's a comparison:
| Parameter | Collaborative Session | Cloud Anchors (ARCore) |
|---|---|---|
| Latency | <20 ms (local network) | 100–500 ms (via server) |
| Internet | Not required | Mandatory |
| Number of devices | Up to 4–5 | Virtually unlimited |
| Platform | Only iOS (ARKit) | Android, iOS (via ARKit+ARCore) |
| Server cost | None | Google Cloud (paid traffic) |
For local scenarios (office, exhibition), Collaborative Session is 30–50% faster and requires no external servers. Infrastructure savings reach 50–60%.
How to Ensure Reliable Synchronization
- MultipeerConnectivity is unreliable. MCSession drops peers without clear errors. Solution: a MultipeerConnectivity heartbeat every 2 seconds, automatic reconnection after three missed pings.
-
CollaborationData packet size. With active camera movement, traffic reaches 50–100 KB/s per device. For 4 participants — up to 400 KB/s. For 5 devices, it can approach 500 KB/s. Send CollaborationData over
.unreliable(ARKit recovers from lost packets). Send critical data (object coordinates) over a separate reliable channel. - Heartbeat mechanism. Our certified ARKit developers with 7+ years of experience guarantee that MultipeerConnectivity heartbeat ensures stable connections.
What Happens When Maps Merge?
Before merging, each device has its own local coordinate system. Anchors added earlier may jump. Track ARParticipantAnchor:
func session(_ session: ARSession, didAdd anchors: [ARAnchor]) {
let participants = anchors.compactMap { $0 as? ARParticipantAnchor }
if !participants.isEmpty {
// Maps merged — can now place objects
enableObjectPlacement()
}
}
Place objects only after ARParticipantAnchor appears — otherwise desynchronization is inevitable.
What Data Is Synchronized in Collaborative Session?
CollaborationData contains feature points, depth map, and anchors. Custom objects (e.g., virtual furniture) are not synchronized automatically — their coordinates must be sent separately. We recommend a reliable channel for object positions and .unreliable for CollaborationData.
| Data Type | Channel | Mode |
|---|---|---|
| CollaborationData | MultipeerConnectivity/WebSocket | Unreliable |
| Object coordinates | Separate channel | Reliable |
| Events (placement, deletion) | Separate channel | Reliable |
Our Process: From Analysis to Deployment
- Analyze use case and network constraints.
- Design architecture: transport selection, sync scheme.
- Implement ARWorldTrackingConfiguration and transport layer.
- Handle session lifecycle: participant discovery, map merging, peer departure.
- Test on real devices under various network conditions.
What's Included in Our Work
- Collaborative Session architecture with transport selection (MultipeerConnectivity, WebSocket, GameKit).
- Implementation of heartbeat, reconnection, and buffering.
- Synchronization of custom objects via a separate reliable channel.
- Integration with your UI: placement, deletion, movement of objects.
- Documentation and source code access.
- Team training (2 hours online) and post-release support (7 days guarantee).
Timelines
A basic Collaborative Session with MultipeerConnectivity — 2–3 weeks. With full edge‑case handling, state synchronization, and UI — 4–7 weeks. Development cost starts at $5,000 for basic integration. Consultation available upon request.
Common Implementation Mistakes
- Packet loss under unreliable delivery is not critical for CollaborationData — ARKit rebuilds the map.
- Reliable delivery of CollaborationData causes queuing and lag — use
.unreliable. - Placing objects before map merge leads to anchor jitter — wait for
ARParticipantAnchor. - A departing participant without buffer clearing accumulates packets — clear the buffer on disconnect.
We are ready to help with your AR project.







