TechnologiesDevice, Sensors & Hardware

NearbyInteraction

iOSmacOStvOSwatchOSvisionOS

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.

  • Cl
    NISessioniOS 14.0+
    Nearby interaction session.
  • Pr
    NISessionDelegateiOS 14.0+
    Delegate for nearby interaction session updates.

Peer Identity 1

Identify and exchange tokens for each participant in a session.

  • Cl
    NIDiscoveryTokeniOS 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.

  • Cl
    NIConfigurationiOS 14.0+
    An object to describe and configure parameters to be used in a nearby interaction session.
  • Cl
    NINearbyPeerConfigurationiOS 14.0+
    An object to describe and configure parameters to be used in a nearby interaction session for mutual relative positional measurements.
  • Cl
    NINearbyAccessoryConfigurationiOS 15.0+
    A session configuration that enables interaction with supported accessories.
  • Cl
    NIDLTDOAConfigurationiOS 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.

  • Cl
    NINearbyObjectiOS 14.0+
    A nearby object with distance and direction measurements.
  • Cl
    NIDLTDOAMeasurementiOS 26.0+
    Represents a single measurement relative to a DL-TDOA anchor.
  • En
    NIDLTDOACoordinatesTypeiOS 26.0+
    The coordinate types of DL-TDOA measurement updates that Nearby Interaction supports.
  • En
    NIDLTDOAMeasurementTypeiOS 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.

  • Cl
    NIAlgorithmConvergenceiOS 16.0+
    An object that reports whether the ranging algorithm has converged and what is needed to converge.
  • En
    NIAlgorithmConvergenceStatus
    Constants that indicate whether the ranging algorithm has converged or what it still needs.
  • En
    NIMotionActivityStateiOS 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.

  • Pr
    NIDeviceCapabilityiOS 16.0+
    A protocol that describes the Nearby Interaction features a device supports.
  • St
    NIErroriOS 14.0+
    A structure that describes errors raised while running a Nearby Interaction session.

Extends 1

__NIAlgorithmConvergenceStatus
← Device, Sensors & Hardware