---
title: connectionID
framework: externalaccessory
role: symbol
role_heading: Instance Property
path: externalaccessory/eaaccessory/connectionid
---

# connectionID

The accessory’s unique ID for connecting to the iOS-based device.

## Declaration

```swift
var connectionID: Int { get }
```

## Discussion

Discussion The connection ID uniquely identifies this accessory to the device. If multiple accessories of the same type are connected to the device, you can use this information to distinguish between them. The connection ID for an accessory persists only for the duration of the current connection. If the accessory is disconnected and reconnected, a new connection ID is assigned.

## See Also

### Getting Connection Information

- [isConnected](externalaccessory/eaaccessory/isconnected.md)
- [Null Connection ID](externalaccessory/null-connection-id.md)
