0
活動我與XMPP架構的iOS庫我的聊天應用程序的工作,讓有關的用戶上次活動它提供了一些問題,「禁止」錯誤最後的用戶
這裏是我的代碼,以獲得用戶的上次活動
let senderJID = XMPPJID.init(string:detailVC.bareJidStr)
let lastAcivity = appDelegate.lastActivity?.sendQuery(to: senderJID, withTimeout: XMPPStreamTimeoutNone)
print(lastAcivity as Any)
public func xmppLastActivity(_ sender: XMPPLastActivity!, didReceiveResponse response: XMPPIQ!) {
// Extract the seconds from response IQ
let time = response.lastActivitySeconds()
print("time in seconds \(time)")
print("response \(response))")}
error:-> <error code="403" type="auth"><forbidden xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"></forbidden></error>
您需要通過認證參數。 – iParesh
謝謝,但如何傳遞參數呢?我可以舉個例子嗎? – Bucket