mesibo / messenger-app-ios

Open Source Messenger App For iOS - Real-time Messaging, Voice and Video Calls
https://mesibo.com
106 stars 32 forks source link

Chat View Controller back button strange behavior #17

Closed hamzabinamin closed 3 years ago

hamzabinamin commented 3 years ago

I am launching the chat screen using the following code:

MesiboUI.launchMessageViewController(vc, profile: self.mProfile)

However when I click on its back button, it takes me back to the first view controller present in the navigation controller instead of second view controller from which the chat view controller was opened. Is there a call back function for the back button?

hamzabinamin commented 3 years ago

@mesibo can you please check this

mesibo commented 3 years ago

It either performs dismiss or pop the view controller, are you observing anything different? The source code is here

https://github.com/mesibo/ui-modules-ios/blob/master/Messaging/Messaging/MesiboMessageViewController.m#L620

hamzabinamin commented 3 years ago

I think this is the problem [self.navigationController popToViewController:((UIViewController *)[allViewControllers objectAtIndex:0]) animated:YES];

I don't want it to pop to the first view controller in the navigation controller, it should pop back to the previous view controller.

mesibo commented 3 years ago

Thank you for pointing it out. We will fix it in the next SDK update which is planned for the next week. Alternatively, you can download the source code and rebuild it.

hamzabinamin commented 3 years ago

Can you link me the repository for the entire sdk? as I am using other functions such as call as well. Also it would be helpful to know how can I integrate it manually into my project. I'm using Swift and Xcode 12

mesibo commented 3 years ago

All the UI modules are in the same repository. We will soon release iOS call modules too (android call is already released and you can find them under the ui-modules-android repository).

We have also updated UI SDK. Test and let us know if that fixed the navigation issue for you.

hamzabinamin commented 3 years ago

@mesibo the pop issue is fixed however when I make audio calls, I get the following error. Both users are online

onMesage:  Optional(1 bytes)
E(0303-200934-165)(226824192): *** BUG *** call message received and call ctx is null
hamzabinamin commented 3 years ago

@mesibo can you also let me know how can I hide the default back button in the mesibo view controller, I see 2 back arrows, one is from my navigation controller and the other is from ui?.enableBackButton = true. I want to remove the back button from my navigation controller however the following code doesn't work:

self.navigationItem.setHidesBackButton(true, animated: true)

How should I remove it?

Here's an image of it

hamzabinamin commented 3 years ago

@mesibo any update please?

mesibo commented 3 years ago

You can download the UI module source code and change it to meet your requirements.

hamzabinamin commented 3 years ago

@mesibo the pop issue is fixed however when I make audio calls, I get the following error. Both users are online

onMesage:  Optional(1 bytes)
E(0303-200934-165)(226824192): *** BUG *** call message received and call ctx is null

What about this? @mesibo