SDKsiOS
Subscribe to user status
Subscribe to the online status of visible users with OpenIM iOS SDK.
[[OIMManager manager] subscribeUsersStatus:userIDs
onSuccess:^(NSArray<OIMUserStatusInfo *> *states) {
[presenceStore mergeStates:states];
}
onFailure:nil];Remove empty and duplicate IDs, and subscribe only to users who are currently visible. The array returned on success establishes a snapshot; merge each item by userID.
This page is the sole owner of onUserStatusChanged:. Register and remove the same stable OIMUserListener instance. The delegate delivers incremental updates only for subscribed users.
Was this page helpful?