Instance Methods | |
(void) | - addSignalingListener: |
(void) | - removeSignalingListener: |
(NSString *) | - invite:data:onlineUserOnly:offlinePushInfo:timeout:succ:fail: |
(NSString *) | - inviteInGroup:inviteeList:data:onlineUserOnly:timeout:succ:fail: |
(void) | - cancel:data:succ:fail: |
(void) | - accept:data:succ:fail: |
(void) | - reject:data:succ:fail: |
(V2TIMSignalingInfo *) | - getSignallingInfo: |
(void) | - addInvitedSignaling:succ:fail: |
(void) | - modifyInvitation:data:succ:fail: |
|
protected |
Callback definition on get signaling information successfully
- (void) addSignalingListener: | (addSignalingListener(listener:)) | NS_SWIFT_NAME |
Add the signaling listener
- (void) removeSignalingListener: | (removeSignalingListener(listener:)) | NS_SWIFT_NAME |
Remove the signaling listener
- (NSString*) invite: | (NSString *) | invitee | |
data: | (NSString *) | data | |
onlineUserOnly: | (BOOL) | onlineUserOnly | |
offlinePushInfo: | (V2TIMOfflinePushInfo *) | offlinePushInfo | |
timeout: | (int) | timeout | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Invite someone
invitee | Invitee's user ID |
data | Custom data |
timeout | Timeout duration, in seconds. If it is set to 0, the SDK does not perform timeout detection nor trigger the onInvitationTimeout callback. |
onlineUserOnly | Whether the message can be received only by online users. If this field is set to true, the message can be received only by online users, and the invite operation does not produce historical messages (nor do subsequent cancel, accept, reject, and timeout operations of this invite operation). The invite operation does not produce historical messages (nor do subsequent cancel, accept, reject, and timeout operations of this invite operation). |
offlinePushInfo | Offline push information, where the desc field is required. The information specified by desc will be displayed by default during push. |
- (NSString*) inviteInGroup: | (NSString *) | groupID | |
inviteeList: | (NSArray *) | inviteeList | |
data: | (NSString *) | data | |
onlineUserOnly: | (BOOL) | onlineUserOnly | |
timeout: | (int) | timeout | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Invite certain users in the group
groupID | ID of the inviter's group |
inviteeList | List of invitees. Invitees specified by inviteeList must be in the group specified by groupID. Otherwise, the invitation fails. |
timeout | Timeout duration, in seconds. If it is set to 0, the SDK does not perform timeout detection nor trigger the onInvitationTimeout callback. |
onlineUserOnly | Whether the message can be received only by online users. If this field is set to true, the message can be received only by online users, and the invite operation does not produce historical messages (nor do subsequent cancel, accept, reject, and timeout operations of this invite operation). The invite operation does not produce historical messages (nor do subsequent cancel, accept, reject, and timeout operations of this invite operation). |
- (void) cancel: | (NSString *) | inviteID | |
data: | (NSString *) | data | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
The inviter canceled the invitation
inviteID | Invitation ID |
- (void) accept: | (NSString *) | inviteID | |
data: | (NSString *) | data | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
The invitee accepts the invitation
- (void) reject: | (NSString *) | inviteID | |
data: | (NSString *) | data | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
The invitee rejects the invitation
- (V2TIMSignalingInfo *) getSignallingInfo: | (V2TIMMessage *) | msg |
Get the signaling information
If onlineUserOnly is set to false in the invite operation, a custom message is generated for each signaling operation (including the invite, cancel, accept, reject, and timeout operations). The message will be delivered to users via V2TIMAdvancedMsgListener -> onRecvNewMessage and can be pulled by users via historical message pulling. If you want to customize the display text based on the signaling information, call the following API to get the signaling information.
msg | Message object |
- (void) addInvitedSignaling: | (V2TIMSignalingInfo *) | signallingInfo | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Add invitation signaling
It is mainly used for inviter to send group invitation when the invitees are offline, and sync the signaling info to SDK after the invitees are online, so as to use the signaling function normally.
When the invitee clicks the offline push message notification and starts the App:
- (void) modifyInvitation: | (NSString *) | inviteID | |
data: | (NSString *) | data | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Modify the invitaion (supported only in 6.7 and later versions)