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!
