---
title: "setDelegate(_:queue:)"
framework: callkit
role: symbol
role_heading: Instance Method
path: "callkit/cxcallobserver/setdelegate(_:queue:)"
---

# setDelegate(_:queue:)

Sets a call observer delegate, specifying an optional queue on which to execute delegate methods.

## Declaration

```swift
func setDelegate(_ delegate: (any CXCallObserverDelegate)?, queue: dispatch_queue_t?)
```

## Parameters

- `delegate`: An object conforming to the CXCallObserverDelegate protocol.
- `queue`: The queue on which to execute delegate methods. If nil, delegate methods are performed on the main queue. important: Any queue specified is stored as a weak reference.
