Step 1: Initialize the SDK
You must initialize the SDK before calling any other SDK function. For details, see SDK initialization.Step 2: Enable IM
Get a token
To enable the SDK’s IM (out-of-channel messaging) service, first get an authentication token through the server API, then establish the messaging connection with the following API.Set the delegate
To subscribe to delegate events, you must create an instance ofRTCEngineIMDelegate and make your class conform to the RTCEngineIMDelegate protocol.
Implement the callbacks
- Connected callback
- Reconnecting callback
- Reconnected callback
- Disconnected callback
- Message received callback