Agora RTC Objective-C API Reference Refactor

Instance Methods
<AgoraRtmClientDelegate> Protocol Reference

Inherits <NSObject>.

## Instance Methods
(void) | - rtmKit:didReceiveLinkStateEvent:
(void) | - rtmKit:didReceiveMessageEvent:
(void) | - rtmKit:didReceivePresenceEvent:
(void) | - rtmKit:didReceiveLockEvent:
(void) | - rtmKit:didReceiveStorageEvent:
(void) | - rtmKit:didReceiveTopicEvent:
(void) | - rtmKit:didReceiveTokenEvent:
(void) | - rtmKit:tokenPrivilegeWillExpire:
(void) | - rtmKit:channel:connectionChangedToState:reason:

## Method Documentation

## ◆ rtmKit:didReceiveLinkStateEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceiveLinkStateEvent: |  | (AgoraRtmLinkStateEvent *_Nonnull) | event
| optional

Occurs when link state change

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  event | details of link state event.

## ◆ rtmKit:didReceiveMessageEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceiveMessageEvent: |  | (AgoraRtmMessageEvent *_Nonnull) | event
| optional

Occurs when receive a message.

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  event | details of message event.

## ◆ rtmKit:didReceivePresenceEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceivePresenceEvent: |  | (AgoraRtmPresenceEvent *_Nonnull) | event
| optional

Occurs when remote user presence changed

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  event | details of presence event.

## ◆ rtmKit:didReceiveLockEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceiveLockEvent: |  | (AgoraRtmLockEvent *_Nonnull) | event
| optional

Occurs when lock state changed

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  event | details of lock event.

## ◆ rtmKit:didReceiveStorageEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceiveStorageEvent: |  | (AgoraRtmStorageEvent *_Nonnull) | event
| optional

Occurs when receive storage event

Parameters

  rtmKit | the AgoraRtmClientKit Object
  event | details of storage event.

## ◆ rtmKit:didReceiveTopicEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceiveTopicEvent: |  | (AgoraRtmTopicEvent *_Nonnull) | event
| optional

Occurs when remote user join/leave topic or when user first join this channel, got snapshot of topics in this channel

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  event | details of topic event.

## ◆ rtmKit:didReceiveTokenEvent:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
didReceiveTokenEvent: |  | (AgoraRtmTokenEvent *_Nonnull) | event
| optional

Occurs when receive token event.alignof

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  event | details of token event.

## ◆ rtmKit:tokenPrivilegeWillExpire:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | rtmKit
tokenPrivilegeWillExpire: |  | (NSString *_Nullable) | channel
| optional

Occurs when token will expire in 30 seconds.

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  channelName | The name of the channel.

## ◆ rtmKit:channel:connectionChangedToState:reason:

- (void) rtmKit: |  | (AgoraRtmClientKit *_Nonnull) | kit
channel: |  | (NSString *_Nonnull) | channelName
connectionChangedToState: |  | (AgoraRtmClientConnectionState) | state
reason: |  | (AgoraRtmClientConnectionChangeReason) | reason
| optional

Occurs when the connection state changes between rtm sdk and agora service.

Parameters

  rtmKit | the AgoraRtmClientKit Object.
  channelName | The Name of the channel.
  state | The new connection state.
  reason | The reason for the connection state change.