<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "watchOS: 7.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/NINearbyPeerConfiguration",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Nearby Interaction"
    ],
    "preciseIdentifier" : "c:objc(cs)NINearbyPeerConfiguration"
  },
  "title" : "NINearbyPeerConfiguration"
}
-->

# NINearbyPeerConfiguration

A configuration that enables interaction between iPhone or Apple Watch devices.

```
class NINearbyPeerConfiguration
```

## Overview

A peer interaction session enables two Apple devices to share their respective distance and direction through the device’s Ultra Wideband (UWB) chip. To start a peer interaction session, create a [`NINearbyPeerConfiguration`](/documentation/NearbyInteraction/NINearbyPeerConfiguration) instance and pass it to an [`NISession`](/documentation/NearbyInteraction/NISession) instance with the [`run(_:)`](/documentation/NearbyInteraction/NISession/run(_:)) function.

For an example app that demonstrates this configuration, see [Implementing interactions between users in close proximity](/documentation/NearbyInteraction/implementing-interactions-between-users-in-close-proximity).

### Enable Precision Finding for stationary objects

In iOS 16, you can combine the visual spatial power of ARKit with the radio sensitivity of the UWB chip to locate stationary nearby objects with considerable precision. To do that, set [`isCameraAssistanceEnabled`](/documentation/NearbyInteraction/NINearbyPeerConfiguration/isCameraAssistanceEnabled) to `true` and optionally provide the interaction session with an <doc://com.apple.documentation/documentation/ARKit/ARSession> instance through [`setARSession(_:)`](/documentation/NearbyInteraction/NISession/setARSession(_:)) before running the session. Together, the UWB chip and ARKit’s assistance enable Nearby Interaction to provide the same Precision Finding capabilities present in AirTag.

## Topics

### Creating a configuration

[`-  initWithPeerToken:`](/documentation/NearbyInteraction/NINearbyPeerConfiguration/init(peerToken:))

Creates a configuration for interaction between devices, including iPhone and Apple Watch.

### Accessing the discovery token

[`peerDiscoveryToken`](/documentation/NearbyInteraction/NINearbyPeerConfiguration/peerDiscoveryToken)

A value that uniquely identifies the other peer in the interaction session.

### Subclassing a configuration

[`NIConfiguration`](/documentation/NearbyInteraction/NIConfiguration)

An abstract base class for interaction configurations.

### Enabling Camera Assistance

[`cameraAssistanceEnabled`](/documentation/NearbyInteraction/NINearbyPeerConfiguration/isCameraAssistanceEnabled)

A Boolean value that combines the spatial awareness of ARKit with Nearby Interaction to improve the accuracy of a nearby object’s position.

### Checking distance measurement capability

[`extendedDistanceMeasurementEnabled`](/documentation/NearbyInteraction/NINearbyPeerConfiguration/isExtendedDistanceMeasurementEnabled)

A Boolean value that indicates whether both peers can use extended distance measurement for this Nearby Interaction session instance.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Equatable`](/documentation/Swift/Equatable)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NIConfiguration`](/documentation/NearbyInteraction/NIConfiguration)

---

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)