---
title: NINearbyPeerConfiguration
framework: nearbyinteraction
role: symbol
role_heading: Class
path: nearbyinteraction/ninearbypeerconfiguration
---

# NINearbyPeerConfiguration

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

## Declaration

```swift
class NINearbyPeerConfiguration
```

## Mentioned in

Initiating and maintaining a session

## Overview

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 instance and pass it to an NISession instance with the run(_:) function. For an example app that demonstrates this configuration, see 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 to true and optionally provide the interaction session with an ARSession instance through 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

- [init(peerToken:)](nearbyinteraction/ninearbypeerconfiguration/init(peertoken:).md)

### Accessing the discovery token

- [peerDiscoveryToken](nearbyinteraction/ninearbypeerconfiguration/peerdiscoverytoken.md)

### Subclassing a configuration

- [NIConfiguration](nearbyinteraction/niconfiguration.md)

### Enabling Camera Assistance

- [isCameraAssistanceEnabled](nearbyinteraction/ninearbypeerconfiguration/iscameraassistanceenabled.md)

### Checking distance measurement capability

- [isExtendedDistanceMeasurementEnabled](nearbyinteraction/ninearbypeerconfiguration/isextendeddistancemeasurementenabled.md)

## Relationships

### Inherits From

- [NIConfiguration](nearbyinteraction/niconfiguration.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Phone interaction

- [Implementing interactions between users in close proximity](nearbyinteraction/implementing-interactions-between-users-in-close-proximity.md)
- [Discovering peers with Multipeer Connectivity](nearbyinteraction/discovering-peers-with-multipeer-connectivity.md)
- [Extending advanced direction finding and ranging](nearbyinteraction/extending-advanced-direction-finding-and-ranging.md)
