Preventing pop to root when leaving channel

Hi, we are using the Sendbird UI Kit version 2.2.1 and we are facing a major issue when leaving a channel where the UI kit pops to the root controller with (apparently) no way of customization.

Our navigation stack looks like this:

  • NavigationController
    • ControllerA
    • ControllerB
    • SBUChannelViewController
    • SBUChannelSettingsViewController

When leaving a channel, it’s popping directly to ControllerA while we want it to pop to ControllerB. I figured this is caused by SBUBaseChannelSettingViewController line 293.

Since we are importing the UI kit with SPM, are we missing something or should we import it directly into the project and customize it?

Thanks!

Hello, have you find any way to fix it??

I ended up importing the library code in the project and customizing it.

And what about sdk updates? How do you manage code maintenance?

1 Like

Hello @hv_matt, @Manuel_Bermudez

Sorry for the late checking.
UIKit v2 does not support customizing that function. you must use open source for customization.
We will provide a customizable function related to the contents you inquired about in the next UIKit v2 update.

(UIKit v2 version has many restrictions on customization and will be deprecated within this year, so migration to UIKit v3 is recommended.)

Hi Tez, is there any way to do it with the current version v3?

Thanks!

@Manuel_Bermudez Hi, v3 is going to support from upcoming version which is going to be released on next week (3.3.7)

Great, we are expecting!!

Thanks!

Hi we have saw that in v3.3.7 (Feb 28, 2023) with Chat SDK v4.4.0 release there is a new popToChannel() function in SBUBaseSelectUserViewController.

We don’t know how to override this function.

We have created the class:

class CustomInviteUserViewController: SBUInviteUserViewController {   
    override func popToChannel() {
        print("POP TO CHANNEL EVENT")
    }  
}

And set:
SBUViewControllerSet.InviteUserViewController = CustomInviteUserViewController.self

But popToChannel() never gets called.

We init the flow calling:

let channelListVC = SBUGroupChannelListViewController()
self.navigationController?.pushViewController(channelListVC, animated: true)

Can you please help us?
Thanks in advance.

Please, we are expecting for your response to continue with the development.
Thanks a lot.