Modal presentation of Messaging iOS SDK conversation screens | The place for Zendesk users to come together and share
Skip to main content
Question

Modal presentation of Messaging iOS SDK conversation screens

  • June 4, 2026
  • 2 replies
  • 83 views

My team is currently integrating the messaging mobile SDKs. While doing so on iOS we encountered an unexpected presentation behavior.

According to the documentation https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/ios/getting_started/#presenting-the-conversation-modally this is how we should display the messaging screen modally:

if let viewController = Zendesk.instance?.messaging?.messagingViewController() {
let navigationController = UINavigationController(rootViewController: viewController)
navigationController.modalPresentationStyle = .fullScreen
present(navigationController, animated: true)
}

Our app is a pure SwiftUI app, so we had to wrap it in a UIViewControllerRepresentable.

When we do so, the user has no button at all to close the modal, nevertheless which exitAction we pick for showMostRecentConversation screen.

So we had to add a close button to the toolbar of the SwiftUI View wrapping the Zendesk content. But then we end up with two navigation bars.

Here an overview of different attempts to try to find the correct presentation way. We also tried to not wrap in another UINavigationController since there seems to be already a navigation controller inside the Zendesk views. But that led to some blank screen when the user navigates back.

We want the user to be able to navigate back to the conversation list but still be able to close the modal on both screens (conversation list, conversation). But as you can see on the first two screenshots the close button added via SwiftUI sits on its own navigation bar, while the Zendesk back button is on its own navigation bar. The back button also appears dislocated.

What is the right approach in this case?

Thanks!

2 replies

Hello,

How should the dismissal flow be handled when the Zendesk messaging screen is embedded in a SwiftUI wrapper, given that neither exitAction nor the default navigation controller reliably provides a close button? 


My expectation is that the Zendesk UIViewControllers should work better with SwiftUI. UIKit is from the past …

The presentation should look like in the screenshots where the UIViewController is not wrapped in a UINaivgationController (I know, that’s the wrong approach and leads to issues). The UINavigationBar is at the full top of the modal view. It should be possible to have both: a back button to the list and a close button that closes the modal.