---
title: "init(device:delegate:)"
framework: IOBluetooth
role: symbol
role_heading: Initializer
platforms: [macOS 10.7+]
path: "iobluetooth/iobluetoothhandsfree/init(device:delegate:)"
---

# init(device:delegate:)

Create a new IOBluetoothHandsFree object

## Declaration

```swift
init!(device: IOBluetoothDevice!, delegate inDelegate: (any IOBluetoothHandsFreeDelegate)!)
```

## Parameters

- `device`: An IOBluetoothDevice
- `inDelegate`: An object to act as delegate that implements the IOBluetoothHandsFreeDelegate protocol.

## Return Value

Return Value A newly created IOBluetoothHandsFreeAudioGateway object on success, nil on failure

## Discussion

Discussion This method should be called on a subclass (IOBluetoothHandsFreeDevice or IOBluetoothHandsFreeAudioGateway) to get full functionality.
