---
title: "withObjectID(_:)"
framework: IOBluetooth
role: symbol
role_heading: Type Method
path: "iobluetooth/iobluetoothrfcommchannel/withobjectid(_:)"
---

# withObjectID(_:)

Returns the IObluetoothRFCOMMChannel with the given IOBluetoothObjectID.

## Declaration

```swift
class func withObjectID(_ objectID: IOBluetoothObjectID) -> Self!
```

## Parameters

- `objectID`: IOBluetoothObjectID of the desired IObluetoothRFCOMMChannel.

## Return Value

Return Value Returns the IObluetoothRFCOMMChannel that matches the given IOBluetoothObjectID if one exists. If no matching RFCOMM channel exists, nil is returned.

## Discussion

Discussion The IOBluetoothObjectID can be used as a global reference for a given IObluetoothRFCOMMChannel. It allows two separate applications to refer to the same IObluetoothRFCOMMChannel object.
