Closed StevenWatremez closed 1 year ago
So I have more information and pain point for this. I tried to encapsulate the ChatViewController inside a tab of an UITabBarController
let ctrl1 = UIViewController()
ctrl1.view.backgroundColor = .red
ctrl1.tabBarItem = .init(tabBarSystemItem: .favorites, tag: 0)
let appearance = UITabBarAppearance()
appearance.configureWithOpaqueBackground()
let chatCtrl = ChatViewController()
chatCtrl.tabBarItem = .init(title: "Support", image: UIImage(systemName: "message"), tag: 1)
let tabController = UITabBarController()
tabController.tabBar.standardAppearance = appearance
tabController.tabBar.scrollEdgeAppearance = appearance
tabController.viewControllers = [
ctrl1,
chatCtrl,
]
As a result, the chat is integrated inside the tabBar, job done. But the cross button at the top right and corner is not cliquable to dismiss the keyboard, because on your side you bind it to only dismiss le controller and not the keyboard. The only way to dismiss the keyboard is to click on the chat scroll view.
I know that your chat is not built to be integrated inside an existing navigation, but can we find a quick solution for this ? Maybe add a dismiss keyboard in addition to the dismiss controller ?
We can consider implementing a such feature, however, we believe that in terms of UI/UX, embedding a chat like Crisp in a TabBar seems a bad idea, because of the keyboard management would overlay the tabbar menu anyway.
It would be nice if you show how Crisp is currently integrated in your app.
As an example, here is what we do with Crisp:
For our usecase the chat is central for customer communication.
Here you can see the integration.
We tried to handle the chat like you did but we had a deeplink problem to present a view when the navigation stack is creating, hard to handle this case if I present the chat. So with your code I integrated inside the tabBar and the bug appear.
Hi there,
It’s been a while since this issue was reported, and we’ve launched a new major version of the Crisp SDK since then. The updates might have resolved the issue you encountered.
We’d appreciate it if you test the latest version to see if the issue persists. Feel free to reopen this issue with more details if needed.
Thanks for your support!
Hi
I am planning to integrate your chat in my application. But I have a problem during my tests. I have a chat in my application that is on a specific tab inside a UITabController and I wanted to replace it with your chat. But as your
ChatViewController
is final I can't inherit it on a customUIViewController
. So I tried to push it into an existingUINavigationController
to place it in my navigation, to simulate the tab with the chat inside, and I have a crash when I tried to push youChatViewController
. Have you an idea how to do this with your sdk. Have you a special ViewController for this ?Fatal Exception: NSInvalidArgumentException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'
Stacktrace