如何退出getstream.io feed客户端

时间:2019-11-27 20:57:07

标签: getstream-io

我需要知道如何退出get-stream feed客户端。或更改令牌。 这是我的配置

Client.config = .init(apiKey: "key",appId: "aped",token: str)

1 个答案:

答案 0 :(得分:0)

使用最新版本的Stream Feeds SDK v.2.2.0或更高版本。

// Setup a shared Stream Client.
Client.config = .init(apiKey: "<#ApiKey#>", appId: "<#AppId#>")

// Setup a Stream user, when your user was logged in.
Client.shared.setupUser(token: token) { _ in 
    // Do all your requests from here. Reload feeds and etc.
}

您可以在Wiki页面上找到更多示例: https://github.com/GetStream/stream-swift/wiki