Recent searches
No recent searches
iOS new messaging SDK, no header or close button
Posted Feb 11, 2022
Hey,
I'm using the new iOS messaging SDK.
The chat widget is working fine, but there's no header and no close button.
Can these be added to the new iOS Messaging chat?
This is my swift implementation:
guard let viewController = Zendesk.instance?.messaging?.messagingViewController() else { return }
let navigationController = UIApplication.shared.windows.first!.rootViewController;
navigationController?.show(viewController, sender: self);

1
4
4 comments
Mick O'Donnell
Hi Tiberiu,
Thanks for reaching out. The header and back button (no close button) shouldn't appear by default. I'll move this post into a support ticket, as we most likely need to look at your SDK integration more closely.
0
Tiberiu Popescu
Hey, thanks for reaching out, so this is the default behavior of the widget?
Is there documentation of how to add the header and the back button?
0
Dev Dizraptor
Is there any progress?
0
Malcolm Murray
I managed to get around this issue by wrapping the Zendesk Conversations view controller in a UINavigationController, then setting a navigationItem with a rightBarButtonItem on the Zendesk conversations view controller, and then display the navigation controller. The button then references a handler function to dismiss the view Example code as follows:
if let zendeskChatVC = Zendesk.instance?.messaging?.messagingViewController(){
let navController = UINavigationController()
navController.viewControllers = [zendeskChatVC]
zendeskChatVC.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Done", style: .plain, target: self, action: z #selector(self.closeZendeskChatNavController))
DispatchQueue.main.async {
self.present(navController, animated: true)
}
}
0