---
title: NIError.Code
framework: nearbyinteraction
role: symbol
role_heading: Enumeration
path: nearbyinteraction/nierror/code
---

# NIError.Code

Codes that identify errors in Nearby Interaction.

## Declaration

```swift
enum Code
```

## Overview

Overview This enumeration uses session(_:didInvalidateWith:) to collect the errors the framework provides to the delegate.

## Topics

### Errors

- [NIError.Code.activeSessionsLimitExceeded](nearbyinteraction/nierror/code/activesessionslimitexceeded.md)
- [NIError.Code.invalidConfiguration](nearbyinteraction/nierror/code/invalidconfiguration.md)
- [NIError.Code.resourceUsageTimeout](nearbyinteraction/nierror/code/resourceusagetimeout.md)
- [NIError.Code.sessionFailed](nearbyinteraction/nierror/code/sessionfailed.md)
- [NIError.Code.unsupportedPlatform](nearbyinteraction/nierror/code/unsupportedplatform.md)
- [NIError.Code.userDidNotAllow](nearbyinteraction/nierror/code/userdidnotallow.md)
- [NIError.Code.invalidARConfiguration](nearbyinteraction/nierror/code/invalidarconfiguration.md)
- [NIError.Code.accessoryPeerDeviceUnavailable](nearbyinteraction/nierror/code/accessorypeerdeviceunavailable.md)
- [NIError.Code.incompatiblePeerDevice](nearbyinteraction/nierror/code/incompatiblepeerdevice.md)
- [NIError.Code.activeExtendedDistanceSessionsLimitExceeded](nearbyinteraction/nierror/code/activeextendeddistancesessionslimitexceeded.md)

### Initializers

- [init(rawValue:)](nearbyinteraction/nierror/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Errors

- [NIError](nearbyinteraction/nierror.md)
- [NIErrorDomain](nearbyinteraction/nierrordomain.md)
