Skip to content

Setup Client

Alexey Bukhtin edited this page Feb 12, 2020 · 10 revisions

1. Setup as a shared 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.
}

2. More parameters in Client Config

Client.config = .init(apiKey: "<#ApiKey#>",
                      appId: "<#AppId#>", 
                      baseURL: BaseURL(location: .singapore),
                      callbackQueue: .main,
                      logsEnabled: true)

Clone this wiki locally