Agora RTC Objective-C API Reference
Refactor
|
Inherits <NSObject>.
Instance Methods | |
(void) | - joinWithOption:completion: |
(void) | - leave: |
(void) | - renewToken:completion: |
(void) | - joinTopic:option:completion: |
(void) | - leaveTopic:completion: |
(void) | - subscribeTopic:option:completion: |
(void) | - unsubscribeTopic:option:completion: |
(void) | - publishTopicMessage:message:option:completion: |
(void) | - publishTopicMessage:data:option:completion: |
(void) | - getSubscribedUserList:completion: |
(NSString *_Nonnull) | - getChannelName |
(AgoraRtmErrorCode) | - destroy |
- (instancetype _Nullable) NS_UNAVAILABLE |
- (void) joinWithOption: | (AgoraRtmJoinChannelOption *_Nonnull) | option | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
Join the channel.
option | join channel options. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) leave: | (AgoraRtmOperationBlock _Nullable) | completionBlock |
Leave the channel.
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) renewToken: | (NSString *_Nonnull) | token | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
Renews the token. Once a token is enabled and used, it expires after a certain period of time. You should generate a new token on your server, call this method to renew it.
token | token Token used renew. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) joinTopic: | (NSString *_Nonnull) | topic | |
option: | (AgoraRtmJoinTopicOption *_Nullable) | option | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
Join a topic.
topic | The name of the topic. |
option | The options of the topic. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) leaveTopic: | (NSString *_Nonnull) | topic | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
Leave the topic.
topic | The name of the topic. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) subscribeTopic: | (NSString *_Nonnull) | topic | |
option: | (AgoraRtmTopicOption *_Nullable) | option | |
completion: | (AgoraRtmTopicSubscriptionBlock _Nullable) | completionBlock | |
Subscribe a topic.
topic | The name of the topic. |
option | The options of subscribe the topic. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) unsubscribeTopic: | (NSString *_Nonnull) | topic | |
option: | (AgoraRtmTopicOption *_Nullable) | option | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
UnsubscribeTopic a topic.
topic | The name of the topic. |
option | The options of subscribe the topic. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) publishTopicMessage: | (NSString *_Nonnull) | topic | |
message: | (NSString *_Nonnull) | message | |
option: | (AgoraRtmTopicMessageOptions *_Nullable) | options | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
publish a message in the topic.
topic | The name of the topic. |
message | The content of string message. |
options | The option of the message. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) publishTopicMessage: | (NSString *_Nonnull) | topic | |
data: | (NSData *_Nonnull) | data | |
option: | (AgoraRtmTopicMessageOptions *_Nullable) | options | |
completion: | (AgoraRtmOperationBlock _Nullable) | completionBlock | |
publish a message in the topic.
topic | The name of the topic. |
message | The content of raw message. |
options | The option of the message. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (void) getSubscribedUserList: | (NSString *_Nonnull) | topic | |
completion: | (AgoraRtmGetTopicSubscribedUsersBlock _Nullable) | completionBlock | |
Get subscribed user list
topic | The name of the topic. |
completionBlock | The operation result will be notified by completionBlock, if operation success,will given a not nil response and nil errorInfo,if operation failed,will given a nil response and not nil errorInfo. |
- (NSString * _Nonnull) getChannelName |
return the channel name of this stream channel.
- (AgoraRtmErrorCode) destroy |
release the stream channel instance.