<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "Xcode: 17.0.0 -"
  ],
  "documentType" : "article",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/implementing-spatial-interactions-with-third-party-accessories",
  "metadataVersion" : "0.1.0",
  "role" : "sampleCode",
  "title" : "Implementing spatial interactions with third-party accessories"
}
-->

# Implementing spatial interactions with third-party accessories

Establish a connection with a nearby accessory to receive periodic measurements of its distance from the user.

## Overview

> Note: This sample code project is associated with WWDC21 session [10165: Explore Nearby Interaction with Third-Party Accessories](https://developer.apple.com/wwdc21/10165).

### Configure the Sample Code Project

Set the run destination to an iPhone that contains an Ultra Wideband chip. The sample app interacts with an accessory you partner with or develop using the [Nearby Interaction Accessory Protocol Specification](https://developer.apple.com/nearby-interaction).

---

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)