Skip to content

Instantly share code, notes, and snippets.

@cardoso
Last active February 4, 2021 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cardoso/993c79080a7787e446f029c0fcdd32dd to your computer and use it in GitHub Desktop.
Save cardoso/993c79080a7787e446f029c0fcdd32dd to your computer and use it in GitHub Desktop.
import UIKit
import StreamChatClient
...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
/// 1: Create a `ChatClientConfig` with the API key.
let config = ChatClientConfig(apiKeyString: "kvgjrn7nmuuj")
/// 2: Set the shared `ChatClient` instance with the config and a temporary token provider.
ChatClient.shared = ChatClient(config: config, tokenProvider: .anonymous)
return true
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment