pubspec.yaml
file and run pub get
command.11
or higher.pod install
. For apple chip system use rosetta terminal.init()
method initialises the settings required for CometChat. The init()
method takes the below parameters:
setRegion()
method.AppSettings
class allows you to configure three settings:
init()
method on app startup.
App State | Behaviour |
---|---|
App in foreground | Connected with WebSocket |
App in background | Immediately disconnected with WebSocket |
App State | Behaviour |
---|---|
App in foreground | Call CometChat.connect() to create the WebSocket connection |
App in background | Disconnect the WebSocket connection if no ping is received within 30 seconds after the app goes in the background. |