Skip to main content

joinGroup

Feature Introduction

Note

Apply to join a group.

Caution

Based on Group Verification Options, determine the result of applying to join a group.

Relevant Callbacks: onJoinedGroupAdded onGroupMemberAdded onGroupApplicationAdded

Function Prototype


- (void)joinGroup:(NSString *)groupID
reqMsg:(NSString *)reqMsg
joinSource:(OIMJoinType)joinSource
onSuccess:(OIMSuccessCallback)onSuccess
onFailure:(OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeRequiredDescription
groupIDNSStringYesGroup ID
reqMsgNSStringNoRequest message
joinSourceOIMJoinTypeYesJoining method

Return Result

Parameter NameParameter TypeDescription
onSuccessOIMSuccessCallbackSuccess return
onFailureOIMFailureCallbackFailure return

Code Example


[OIMManager.manager joinGroup:@""
reqMsg:nil
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];