<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ARKit",
  "identifier" : "/documentation/ARKit/ARWorldTrackingConfiguration/isCollaborationEnabled",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "ARKit"
    ],
    "preciseIdentifier" : "c:objc(cs)ARWorldTrackingConfiguration(py)collaborationEnabled"
  },
  "title" : "isCollaborationEnabled"
}
-->

# isCollaborationEnabled

A flag that opts you in to a peer-to-peer multiuser AR experience.

```
var isCollaborationEnabled: Bool { get set }
```

## Discussion

The default value of this property is <doc://com.apple.documentation/documentation/Swift/false>. When you enable collaboration, ARKit invokes [`session(_:didOutputCollaborationData:)`](/documentation/ARKit/ARSessionObserver/session(_:didOutputCollaborationData:)) periodically, providing you with collaboration data to share with peers. Collaboration data contains information about the real-world surfaces ARKit detects, your position in relation to them, and any anchors you may have created.

Multiple users sharing collaboration data with each other results in an AR experience in which the users interact by sharing and manipulating anchors. By including information that describes a user’s unique view of the world, collaboration data enhances ARKit’s understanding of the layout of the physical environment much more quickly than is possible with only one user.

For more information, see [Creating a collaborative session](/documentation/ARKit/creating-a-collaborative-session).

> Important:
> Collaborative sessions work best with up to four participants.

### Sharing Collaboration Data Over the Network

You are responsible for sending collaboration data over the network, including choosing the network framework and implementing the code. See [Creating a multiuser AR experience](/documentation/ARKit/creating-a-multiuser-ar-experience) for an example app that shares a world map among users via <doc://com.apple.documentation/documentation/MultipeerConnectivity>. Although [Creating a multiuser AR experience](/documentation/ARKit/creating-a-multiuser-ar-experience) demonstrates sharing world data among peer users, it does so using a host-guest model. The primary advantage of collaboration data is that it enables you to share world data peer-to-peer.

The data you send is a serialized version of the [`ARSession.CollaborationData`](/documentation/ARKit/ARSession/CollaborationData) object provided by your session. You serialize it using <doc://com.apple.documentation/documentation/Foundation/NSKeyedArchiver>.

```swift
func session(_ session: ARSession, didOutputCollaborationData data: ARSession.CollaborationData) {    
    if let collaborationDataEncoded = try? NSKeyedArchiver.archivedData(withRootObject: data, requiringSecureCoding: true) {
        multipeerSession.sendToAllPeers(collaborationDataEncoded)
    } else {
        fatalError("An error occurred while encoding collaboration data.")
    }
}
```

### Updating Your Session with Collaboration Data

When you receive collaboration data from other people, you instantiate an [`ARSession.CollaborationData`](/documentation/ARKit/ARSession/CollaborationData) object with it and pass the object to your session with [`update(with:)`](/documentation/ARKit/ARSession/update(with:)).
For optimum performance, it’s helpful if the participants in a collaborative session are on the same OS version.
Unarchiving `ARSession.CollaborationData` received from a device running a different OS version may fail.

```swift
func receivedData(_ data: Data) {        
    if let collaborationData = try? NSKeyedUnarchiver.unarchivedObject(ofClass: ARSession.CollaborationData.self, from: data) {
        session.update(with: collaborationData)
    } else {
        print("A device running an incompatible OS version is in the collaborative session.")
    }
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)