Exploring iOS SDK - trouble with SwiftUI

Hello everyone,

We are trying to use iOS SDK to provide web messaging on our app mobile.

Requirements are ok for us :
IOS 15 or later ok
ARC ok
CocoaPods ok

We've followed this guide

With Display the Messenger UI Application, it works !

But with SwitftUI, it doesn't ! :frowning:

When we click to submit our test message, nothing has occured :

Anyone have experienced this SwitfUI component ?
How can we go forward this step ?

Thanks !

Hello,

SwiftUI has built in keyboard avoidance (unlike UIKit) which moves the view up when the keyboard is visible. As this avoidance is already implemented internally by our SDK it needs to be disabled in SwiftUI, otherwise the chat view is moved up too much.
This can be done by using this view modifier:

chatHandler.chatView
    .ignoresSafeArea(.keyboard)

We will update the developer documentation to include this.
The fact that the send button is not functional is most likely also caused by this.
Please let me know if it works.

Best Regards,
Andras Solyom

Hello Andreas,

Many thanks for your answer !
It works :slight_smile:

Best regards,
Jean-Christophe

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.