@interface StringeeClient : NSObject
Represents a Stringee client, manages the client's connection. This class provides methods to connect to/disconnect from Stringee server, receives the connection's events, the incoming call event.
| userId |
|---|
|
It's the unique identification of the client on Stringee system.
|
| hasConnected |
|
Whether the client connects to Stringee server:
|
| connectionDelegate |
|
A delegate to monitor the connection's events. For more information, see StringeeConnectionDelegate
|
| incomingCallDelegate |
|
A delegate to monitor when having an incoming call. For more information, see StringeeIncomingDelegate
|
| - initWithConnectionDelegate: |
|
Creates a new StringeClient instance and registers a connectionDelegate object.
|
| - connectWithAccessToken: |
|
Connects to Stringee server with an access token. From SDK 2.2.0: while the client is connected, calling this method with a new token for the same user (for example after requestAccessToken: is invoked shortly before the token expires) renews the token on the open connection without reconnecting. If the token has expired and the server has disconnected the client, call this method with a new token on the same StringeeClient instance to resume the session.
|
| - updateToken:completionHandler: |
|
Renews the access token on the open connection without reconnecting. Call it after tokenWillExpire:exp:expireInSeconds: is invoked on the current connection, with a new token for the same user. On success, the client keeps the new token and also uses it for automatic reconnects. Available from SDK 2.2.0:
|
| - sendCustomMessage:toUserId:completionHandler: |
|
Send a custom message to a user:
|
| - registerPushForDeviceToken:isProduction:isVoip:completionHandler: |
|
Register device token to receive push notification. When you have an incoming call, you receive a notification from Stringee server:
|
| - unregisterPushForDeviceToken:completionHandler: |
|
Remove your device token from Stringee server. Your device will not receive push notification when you have an incoming call:
|
| - disconnect: |
|
Disconnects from Stringee server.
|