Legacy Dev Forum Posts

 View Only

Sign Up

Exploring iOS SDK - trouble with SwiftUI

  • 1.  Exploring iOS SDK - trouble with SwiftUI

    Posted 06-05-2025 19:26

    Jean-Christophe | 2024-11-13 17:15:14 UTC | #1

    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 !


    Andras_Solyom | 2024-11-18 13:12:45 UTC | #2

    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


    Jean-Christophe | 2024-11-18 16:37:03 UTC | #3

    Hello Andreas,

    Many thanks for your answer ! It works :slight_smile:

    Best regards, Jean-Christophe


    system | 2024-12-19 16:37:50 UTC | #4

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


    This post was migrated from the old Developer Forum.

    ref: 30367