SCSChatSessionDelegate
@protocol SCSChatSessionDelegate <NSObject>
The SCSChatSessionDelegate protocol provides state information about the chat
session. Add your implementation to -[SCSChat addDelegate:].
See
SCSChatSession
See
SCSChat
-
Tells the delegate an error was raised during a chat session.
See
Declaration
Objective-C
- (void)session:(id<SCSChatSession>)session didError:(NSError *)error fatal:(BOOL)fatal;Swift
func session(_ session: SCSChatSession!, didError error: Error!, fatal: Bool)Parameters
sessionSCSChatSessioninstance which invoked the error.errorNSErrorinstance describing the error. Error codes can be referenced fromSCSChatErrorCode.fatalIndicates whether the error resulted in the termination of a session.
-
Declaration
Objective-C
- (void)session:(id<SCSChatSession>)session didEnd:(SCSChatSessionEndEvent *)endEvent;Swift
optional func session(_ session: SCSChatSession!, didEnd endEvent: SCSChatSessionEndEvent!)Parameters
sessionSCSChatSessioninstance which invoked the method.endEventSCSChatSessionEndEventdescribing why the session has ended. Error codes can be referenced fromSCSChatErrorCode. -
Tells the delegate when the chat session state has changed.
See
Declaration
Objective-C
- (void)session:(id<SCSChatSession>)session didTransitionFromState:(SCSChatSessionState)previous toState:(SCSChatSessionState)current;Swift
optional func session(_ session: SCSChatSession!, didTransitionFrom previous: SCSChatSessionState, to current: SCSChatSessionState)Parameters
sessionSCSChatSessioninstance which invoked the method.previousSCSChatSessionStateprevious state.currentSCSChatSessionStatecurrent state. -
Tells the delegate when the user’s position in the agent queue has changed.
See
Declaration
Objective-C
- (void)session:(id<SCSChatSession>)session didUpdateQueuePosition:(NSNumber *)position;Swift
optional func session(_ session: SCSChatSession!, didUpdateQueuePosition position: NSNumber!)Parameters
sessionSCSChatSessioninstance which invoked the method.positionNSNumberinstance representing position in the queue.
Install in Dash
SCSChatSessionDelegate Protocol Reference