<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PushToTalk",
  "identifier" : "/documentation/PushToTalk/PTChannelManager/channelManager(delegate:restorationDelegate:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Push to Talk"
    ],
    "preciseIdentifier" : "c:objc(cs)PTChannelManager(cm)channelManagerWithDelegate:restorationDelegate:completionHandler:"
  },
  "title" : "channelManager(delegate:restorationDelegate:completionHandler:)"
}
-->

# channelManager(delegate:restorationDelegate:completionHandler:)

Creates a channel manager with the configuration you specify.

```
class func channelManager(delegate: any PTChannelManagerDelegate, restorationDelegate: any PTChannelRestorationDelegate, completionHandler: @escaping @Sendable (PTChannelManager?, (any Error)?) -> Void)
```

## Parameters

`delegate`

An object that conforms to the channel manager protocol.

`restorationDelegate`

An object that conforms to the channel resoration protocol.

`completionHandler`

The completion callback handler.

- `manager`: A new channel manager instance.
- `error`: An error, if any, that indicates the reason why the system couldn’t create the channel manager.

## Discussion

> Important:
> You can call this method from synchronous code using a completion handler, as shown on this page, or you can call it as an asynchronous method that has the following declaration:
> 
> ```swift
> class func channelManager(delegate: PTChannelManagerDelegate, restorationDelegate: PTChannelRestorationDelegate) async throws -> PTChannelManager
> ```
> 
> For information about concurrency and asynchronous code in Swift, see <doc://com.apple.documentation/documentation/Swift/calling-objective-c-apis-asynchronously>.

You must create a channel manager as soon as possible when launching your app so the system is able to restore existing challenge and deliver push notifications to your [`PTChannelManagerDelegate`](/documentation/PushToTalk/PTChannelManagerDelegate). By providing the restoration delegate, you decide whether to rejoin or leave any previously active channel the system knows about.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)