Inherits <NSObjectNSObject>.
◆ rtmKit:onMessageEvent:
Occurs when receive a message.
- Parameters
-
event | details of message event. |
◆ rtmKit:onPresenceEvent:
Occurs when remote user join/leave channel, join/leave topic or local user joined channel.
note: When remote user join/leave channel will trigger this callback. When remote user(in same channel) joinTopic/destroy Topic will trigger this callback. When local user join channel will trigger this callback.
For type(AgoraRtmPresenceTypeRemoteJoinChannel/AgoraRtmPresenceTypeRemoteLeaveChannel), valid field will be channelType/type/channelName/userId For type(AgoraRtmPresenceTypeRemoteJoinTopic/AgoraRtmPresenceTypeRemoteLeaveTopic) valid field will be channelType/type/channelName/topicInfos/topicInfoNumber For type(AgoraRtmPresenceTypeSelfJoinChannel) valid field will be channelType/type/channelName/topicInfos/topicInfoNumber/userId
- Parameters
-
event | details of presence event. |
◆ rtmKit:onUser:joinChannel:result:
Occurs when user join a channel.
- Parameters
-
channelName | The Name of the channel. |
userId | The id of the user. |
errorCode | The error code. |
◆ rtmKit:onUser:leaveChannel:result:
Occurs when user leave a channel.
- Parameters
-
channelName | The Name of the channel. |
userId | The id of the user. |
errorCode | The error code. |
◆ rtmKit:onUser:joinTopic:inChannel:withMeta:result:
- (void) rtmKit: |
|
(AgoraRtmClientKit *_Nonnull) |
rtmKit |
onUser: |
|
(NSString *_Nonnull) |
userId |
joinTopic: |
|
(NSString *_Nonnull) |
topic |
inChannel: |
|
(NSString *_Nonnull) |
channelName |
withMeta: |
|
(NSData *_Nullable) |
meta |
result: |
|
(AgoraRtmStreamChannelErrorCode) |
errorCode |
|
|
| |
|
optional |
Occurs when user join topic.
- Parameters
-
channelName | The Name of the channel. |
userId | The id of the user. |
topic | The name of the topic. |
meta | The meta of the topic. |
errorCode | The error code. |
◆ rtmKit:onUser:leaveTopic:inChannel:withMeta:result:
- (void) rtmKit: |
|
(AgoraRtmClientKit *_Nonnull) |
rtmKit |
onUser: |
|
(NSString *_Nonnull) |
userId |
leaveTopic: |
|
(NSString *_Nonnull) |
topic |
inChannel: |
|
(NSString *_Nonnull) |
channelName |
withMeta: |
|
(NSData *_Nullable) |
meta |
result: |
|
(AgoraRtmStreamChannelErrorCode) |
errorCode |
|
|
| |
|
optional |
Occurs when user leave topic.
- Parameters
-
channelName | The Name of the channel. |
userId | The id of the user. |
topic | The name of the topic. |
meta | The meta of the topic. |
errorCode | The error code. |
◆ rtmKit:onUser:inTopic:inChannel:withSubscribeSuccess:withSubscribeFailed:result:
- (void) rtmKit: |
|
(AgoraRtmClientKit *_Nonnull) |
rtmKit |
onUser: |
|
(NSString *_Nonnull) |
userId |
inTopic: |
|
(NSString *_Nonnull) |
topic |
inChannel: |
|
(NSString *_Nonnull) |
channelName |
withSubscribeSuccess: |
|
(NSArray< NSString * > *_Nonnull) |
succeedUsers |
withSubscribeFailed: |
|
(NSArray< NSString * > *_Nonnull) |
failedUsers |
result: |
|
(AgoraRtmStreamChannelErrorCode) |
errorCode |
|
|
| |
|
optional |
Occurs when user subscribe topic.
- Parameters
-
channelName | The Name of the channel. |
userId | The id of the user. |
topic | The name of the topic. |
succeedUsers | The subscribed users. |
failedUsers | The failed to subscribe users. |
errorCode | The error code. |
◆ rtmKit:onUser:inTopic:inChannel:withUnsubscribeSuccess:withUnsubscribeFailed:result:
- (void) rtmKit: |
|
(AgoraRtmClientKit *_Nonnull) |
rtmKit |
onUser: |
|
(NSString *_Nonnull) |
userId |
inTopic: |
|
(NSString *_Nonnull) |
topic |
inChannel: |
|
(NSString *_Nonnull) |
channelName |
withUnsubscribeSuccess: |
|
(NSArray< NSString * > *_Nonnull) |
succeedUsers |
withUnsubscribeFailed: |
|
(NSArray< NSString * > *_Nonnull) |
failedUsers |
result: |
|
(AgoraRtmStreamChannelErrorCode) |
errorCode |
|
|
| |
|
optional |
Occurs when user unsubscribe topic.
- Parameters
-
channelName | The Name of the channel. |
userId | The id of the user. |
topic | The name of the topic. |
succeedUsers | The unsubscribed users. |
failedUsers | The failed to unsubscribe users. |
errorCode | The error code. |
◆ rtmKit:channel:connectionStateChanged:result:
Occurs when the connection state changes between rtm sdk and agora service.
- Parameters
-
channelName | The Name of the channel. |
state | The new connection state. |
reason | The reason for the connection state change. |