ASAPPChannelDelegate
@objc
public protocol ASAPPChannelDelegate
Defines methods that may be called by a ASAPPChatInsteadViewController instance.
-
Called every time the user selects a channel to open. Return
falseif you want to handle the action yourself. Otherwise, the SDK will handle the action automatically. Returnstrueby default. Note that this doesn’t include the chat channel, as it must be handled bydidSelectASAPPChatChannel().Declaration
Swift
@objc optional func shouldOpenChannel(_ channel: ASAPPChannel) -> BoolParameters
channelThe enum indicating which channel was selected.
-
Called if there was an error when attempting to open a channel.
Declaration
Swift
func channel(_ channel: ASAPPChannel, didFailToOpenWithErrorDescription errorDescription: String?)Parameters
channelAn enum case indicating which channel failed to open.
errorDescriptionA String with information about the error.
-
Called if the ASAPP chat channel is selected. The implementation must use either
createChatViewControllerForPresentingFromChatInsteadorcreateChatViewControllerForPushingFromChatInsteadto open chat.Declaration
Swift
func didSelectASAPPChatChannel()
ASAPPChannelDelegate Protocol Reference