SDKsiOS
设置成员资料查看权限
使用 iOS SDK 控制群成员能否查看其他成员资料。
控制普通群成员之间是否可以查看群内其他成员的个人资料:
参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
groupInfoDictionary | NSDictionary * | 包含 groupID 和查看成员资料权限配置的字典对象。 |
| 枚举值 | 数值 | 含义 |
|---|---|---|
OIMAllowTypeAllowed | 0 | 允许群成员查看他人资料。 |
OIMAllowTypeNotAllowed | 1 | 禁止普通群成员查看他人资料。 |
NSDictionary *changes = @{
@"groupID": groupID,
@"lookMemberInfo": @(OIMAllowTypeNotAllowed)
};
[[OIMManager manager] setGroupInfoDictionary:changes
onSuccess:^(NSString * _Nullable data) {
[self showProfileAccessUpdated];
}
onFailure:^(NSInteger code, NSString *message) {
[self showErrorCode:code message:message];
}];状态以 groupID 为合并标识。该设置与设置群内添加好友权限相互独立。
返回结果
成功回调 onSuccess 表示服务端已更新该配置。群内各端随后会通过群资料变更事件收到更新后的 OIMGroupInfo,完整事件处理见群组概览。
这个页面有帮助吗?