NearbyInteraction measures relative distance and direction between nearby devices using Ultra Wideband, enabling spatial interactions across iOS, macOS, and watchOS. You run an NISession with a configuration such as NINearbyPeerConfiguration or NINearbyAccessoryConfiguration, exchanging an NIDiscoveryToken to identify each participant. The session reports updates to its NISessionDelegate as NINearbyObject values that carry the measured distance and direction, and surfaces convergence state through NIAlgorithmConvergence and NIAlgorithmConvergenceStatus. Device support is determined through NIDeviceCapability, and errors are reported as NIError.
Sessions 2
Run an interaction session that measures distance and direction to nearby devices.
- ClNISessioniOS 14.0+Nearby interaction session.
- PrNISessionDelegateiOS 14.0+Delegate for nearby interaction session updates.
Peer Identity 1
Identify and exchange tokens for each participant in a session.
- ClNIDiscoveryTokeniOS 14.0+A type used to uniquely discover and identify a device in a nearby interaction session.
Session Configuration 4
Configure a session for peer, accessory, or downlink time-difference-of-arrival interactions.
- ClNIConfigurationiOS 14.0+An object to describe and configure parameters to be used in a nearby interaction session.
- ClNINearbyPeerConfigurationiOS 14.0+An object to describe and configure parameters to be used in a nearby interaction session for mutual relative positional measurements.
- ClNINearbyAccessoryConfigurationiOS 15.0+A session configuration that enables interaction with supported accessories.
- ClNIDLTDOAConfigurationiOS 26.0+A session configuration that enables UWB Down Link Time Difference of Arrival(DL-TDoA) ranging with nearby anchors.
Measurement Results 4
Receive the measured distance, direction, and time-difference data reported during a session.
- ClNINearbyObjectiOS 14.0+A nearby object with distance and direction measurements.
- ClNIDLTDOAMeasurementiOS 26.0+Represents a single measurement relative to a DL-TDOA anchor.
- EnNIDLTDOACoordinatesTypeiOS 26.0+The coordinate types of DL-TDOA measurement updates that Nearby Interaction supports.
- EnNIDLTDOAMeasurementTypeiOS 26.0+The measurement types of DL-TDOA measurement updates that Nearby Interaction supports.
Algorithm Convergence 3
Track whether the ranging algorithm has converged and what user motion is required.
- ClNIAlgorithmConvergenceiOS 16.0+An object that reports whether the ranging algorithm has converged and what is needed to converge.
- EnNIAlgorithmConvergenceStatusConstants that indicate whether the ranging algorithm has converged or what it still needs.
- EnNIMotionActivityStateiOS 15.0+An enumeration of the possible motion activity states.
Device Support and Errors 2
Determine device capabilities and handle errors raised by a session.
- PrNIDeviceCapabilityiOS 16.0+A protocol that describes the Nearby Interaction features a device supports.
- StNIErroriOS 14.0+A structure that describes errors raised while running a Nearby Interaction session.