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 will not perform timeout detection or 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 invitation and the canceling, accepting, rejecting, and timeout of the invitation will not appear among historical messages. |
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 will not perform timeout detection or 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 invitation and the canceling, accepting, rejecting, and timeout of the invitation will not appear among historical messages. |
- (void) cancel: | (NSString *) | inviteID | |
data: | (NSString *) | data | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Cancel an invitation (called by the inviter)
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 this API to get the signaling information.
msg | Message object |
- (void) addInvitedSignaling: | (V2TIMSignalingInfo *) | signallingInfo | |
succ: | (V2TIMSucc) | succ | |
fail: | (V2TIMFail) | fail | |
Add invitation signaling
This API is mainly used to sync group invitations sent to offline users after they are online.
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 invitation (supported only in 6.7 and later versions)