Chat / iOS
Chat iOS v4
Chat iOS
Chat
iOS
Home
/
Chat
/
iOS
/
Channel
This is the new Docs for Chat SDK v4 for iOS. To see the previous Docs, click here.

When a user is online, all data associated with the group channels they are a member of are automatically updated. However, when a user is disconnected from the Sendbird server and reconnects later, the refresh(completionHandler:) method should be called to update the channels with the latest information.

channel.refresh { error in
    guard error == nil else {
        // Handle error.
        return
    }
}

Note: If you want to provide the updated channels with the latest information when your user's app is in the foreground, call refresh(completionHandler:) in the didSucceedReconnection() method which receives a callback from the Sendbird server when successfully reconnected.