SDKsiOS
Set group join verification
Configure verification policies for group applications and invitations with OpenIM iOS SDK.
Invoke setGroupInfoDictionary:onSuccess:onFailure: to configure join verification requirements for applications and member invitations (typically restricted to group owners and administrators):
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
groupInfoDictionary | NSDictionary * | Yes | Dictionary containing the target groupID and the join verification mode. |
Verification type options
| Enumeration value | Numeric value | Description |
|---|---|---|
OIMGroupVerificationTypeApplyNeedVerificationInviteDirectly | 0 | Join applications require review; member invitations join directly. |
OIMGroupVerificationTypeAllNeedVerification | 1 | Both join applications and regular member invitations require review (owner/admin invitations bypass review). |
OIMGroupVerificationTypeDirectly | 2 | Anyone can join directly without requiring approval. |
Code example
NSDictionary *changes = @{
@"groupID": groupID,
@"needVerification": @(OIMGroupVerificationTypeAllNeedVerification)
};
[[OIMManager manager] setGroupInfoDictionary:changes
onSuccess:^(NSString * _Nullable data) {
NSLog(@"setGroupInfoDictionary success");
}
onFailure:^(NSInteger code, NSString *message) {
NSLog(@"setGroupInfoDictionary failed: %ld %@", (long)code, message);
}];Return value
The onSuccess callback returns confirmation when the server accepts the updated verification policy.
State changes after the call
- Local state update: The client updates the local cached group's
needVerificationproperty matchinggroupID. - Event notification: Group members receive an updated
OIMGroupInfoobject through theonGroupInfoChanged:listener callback. - Re-query calibration: To calibrate local cache values, call
getSpecifiedGroupsInfo:onSuccess:onFailure:. For listener setup, refer to Groups overview.
Was this page helpful?