<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "watchOS: 7.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/NIError/Code/userDidNotAllow",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Nearby Interaction"
    ],
    "preciseIdentifier" : "c:@E@NIErrorCode@NIErrorCodeUserDidNotAllow"
  },
  "title" : "NIError.Code.userDidNotAllow"
}
-->

# NIError.Code.userDidNotAllow

An error code that indicates that the user declined the request to share their relative position with nearby devices.

```
case userDidNotAllow
```

## Discussion

In this case, the user needs to enable Nearby Interaction in Settings. For more information, see [Initiating and maintaining a session](/documentation/NearbyInteraction/initiating-and-maintaining-a-session).

---

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)