channelManager(delegate:restorationDelegate:completionHandler:)
Creates a channel manager with the configuration you specify.
Declaration
class func channelManager(delegate: any PTChannelManagerDelegate, restorationDelegate: any PTChannelRestorationDelegate, completionHandler: @escaping @Sendable (PTChannelManager?, (any Error)?) -> Void)class func channelManager(delegate: any PTChannelManagerDelegate, restorationDelegate: any PTChannelRestorationDelegate) async throws -> PTChannelManagerParameters
- 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.
managerA new channel manager instance.
errorAn error, if any, that indicates the reason why the system couldn’t create the channel manager.
Mentioned in
Discussion
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. By providing the restoration delegate, you decide whether to rejoin or leave any previously active channel the system knows about.