Reconnect after disconnect from sendbird server

  • OS: iOS
  • UIKit version: swift package manager (3.1.1)

I’m implementing disconnection in ChannelList and Channel with disconnect function:

SBUMain.disconnect { }

And trying to reconnect using connect or connectIfNeeded like below:
Screen Shot 2022-03-28 at 10.59.18 AM

There is no error or user response.
What is the best practice to disconnect and reconnect from sendbird? Thanks!

public static func connect(
    completionHandler: @escaping (_ user: SBDUser?, _ error: SBDError?) -> Void
) {
    SBUMain.connectIfNeeded(completionHandler: completionHandler)

@Sport_paulyswen Hello.
In UIKit, the two methods seem to be the same.
But why do you want to disconnect it directly and then reconnect it?
Because UIKit manages connections according to the app’s lifecycle, there is no need to disconnect and reconnect.