Im trying to observe the agent status every time I change it from the zendesk Dashboard, but its not working for me. Im just able to get it once for the first time that Im launching the view .
How can I make it reactive and get the updates of the status please.
I used this function :
Chat.accountProvider?.observeAccount { (account) in
switch account.accountStatus {
case .online :
print("agent is online")
case .offline :
print("agent is offline")
}
}
Its fixed now. I just called
Chat.connectionProvider?.connect()
indidFinishLaunchingWithOptions
function ofAppDelegate.swift
file.