Acquire Delegates for iOS

AcquireIOSupport iOS SDK Delegates

To add listeners provided by AcquireIOSupport SDK, add following line on your class where you want to listen to our SDK events
1
AcquireIO.support.delegate = self
Copied!

ConnectionStatusChange

This method will be called by SDK when connection status will change. The details of status that was updated during the connection will be available in the argument.
1
func didChangeConnectionStatus(status: AcquireIOConnectionStatus)
Copied!
AcquireIOConnectionStatus - Connection session status
1
public enum AcquireIOConnectionStatus : Int {
2
/// App support session connection status not connected.
3
case notConnected = 0
4
/// App support session connection status disconnected.
5
case disconnected
6
/// App support session connection status connecting.
7
case connecting
8
/// App support session connection status connected.
9
case connected
10
/// App support session connection status started.
11
case sessionStarted
12
}
Copied!
Once connection is established with Acquire server, the delegate will receive either didChangeConnectionStatus: or onError:.

onError

This function will provide connection related error i.e. invalid input data, expire data etc. To get more details about the error encountered while establishing connection, Implement below delegate method
1
func onError(error: Error)
Copied!

onCallSupportStatusChange

When status of Audio/Video call with Agent changes SDK will call below method. The details of call status that was updated during the connection will be available in the arguments along with the optional message string. To get the call connection status, use
1
func onCallSupportStatusChange(_ status: AcquireIOCallSupportStatus, withMessage message: String?)
Copied!
AcquireIOCallSupportStatus - Call status
1
public enum AcquireIOCallSupportStatus : Int {
2
case notConnected
3
case disconnected
4
case connecting
5
case connected
6
}
Copied!

onAgentConnected

This will be called when agent is connected.
1
func onAgentConnected()
Copied!

didChangeAgentStatus

This optional method will be called by SDK when Agent status changes. The details of agent status that was updated during the connection will be available in the argument along with Agent ID.
1
func didChangeAgentStatus(agentID: String, andStatus status: AcquireIOAgentStatus)
Copied!
AcquireIOAgentStatus - Status for the agent.
1
public enum AcquireIOAgentStatus : Int {
2
/// Online status for agent.
3
case online = 0
4
/// Offline status for agent.
5
case offline
6
/// Invisible status for agent.
7
case invisible
8
}
Copied!

didUserInteracted

This will be called when user interacts with events.
1
func didUserInteracted(withEvent type: AcquireIOInteractionEventType, withData data: [String : Any]?)
Copied!
Event Types available are listed below:
1
public enum AcquireIOInteractionEventType : Int {
2
case audioCallStarted = 0
3
case videoCallStarted
4
case audioCallAnswered
5
case videoCallAnswered
6
case callDeclined
7
case callAutoDeclined
8
case callerViewMinimize
9
case callerViewMaximize
10
case callerViewCameraSwitchToFront
11
case callerViewCameraSwitchToBack
12
case callSpeakerOn //10
13
case callSpeakerOff
14
case callMute
15
case callUnmute
16
case callVideoOn
17
case callVideoOff
18
case callDisconnected
19
case conversationStart
20
case conversationEnd
21
case conversationFeedbackSubmit
22
}
Copied!
Note: For Lite version, only following events will be received
  1. 1.
    conversationStart
  2. 2.
    conversationEnd
  3. 3.
    conversationFeedbackSubmit

didReceiveTriggerEvent

This optional method will be called when fire rule matched for created Triggers from the agent panel. It will receive eventName as parameter
1
func didReceiveTriggerEvent(_ eventName: String)
Copied!

openSupport

This optional method will be called when support view controller is open.
1
func didOpenAcquireSupport()
Copied!

hideSupport

This optional method will be called when support view controller is dismissed.
1
func hideSupport()
Copied!

didReceiveNewMessage

This optional method will be called by SDK when a new message has been received. The details of the message received will be available in the argument.
1
func didReceiveNewMessage(_ message: Any)
Copied!
Last modified 5mo ago