CometChat
object wherever you want to use CometChat.
init()
method initialises the settings required for CometChat. The init()
method takes the below parameters:
setRegion()
method.AppSettings
class allows you to configure two settings:
true
informs the SDK to manage the web-socket connection internally. If set to false
, it informs the SDK that the web-socket connection will be managed manually. The default value for this parameter is true. For more information on this, please check the Managing Web-Socket connections manually section. The default value for this property is true.init()
before calling any other method from CometChat. We suggest you call the init()
method on app startup, preferably in the index.js
file.
APP_ID
with your CometChat App ID and APP_REGION
with your App Region in the above code.
Parameter | Description |
---|---|
appID | CometChat App ID |
appSetting | An object of the AppSettings class. |