Legacy Dev Forum Posts

 View Only

Sign Up

Clarification of some of the functions in the iOS SDK

  • 1.  Clarification of some of the functions in the iOS SDK

    Posted 06-05-2025 18:38

    Fogmeister | 2024-10-01 11:16:57 UTC | #1

    In here... https://developer.genesys.cloud/commdigital/digital/webmessaging/mobile-messaging/messenger-mobile-sdk/ios/

    It shows briefly how to show the chat.

    But I'm not sure I follow everything here. :sweat_smile:

    It looks like the ChatControllerDelegate is doing the presentation of the ChatController? Is that correct? If so, what triggers the delegate to do that? Does this happen on presentation of the MyViewController in the example code?

    I see the same in the sample code also. You have a ChatWrapperViewController

    That it does a similiar thing. Presenting the ChatController from the delegate function. But the delegate function doesn't seem to be called. So I guess it happens on viewWillAppear or something?

    Thanks


    tamasi878 | 2024-10-01 12:07:48 UTC | #2

    Hi Fogmeister,

    When you assign the delegate, the chat engine is created, and the creation process will trigger the delegate method to display the ViewController. So the first trigger is ChatController.delegate = self. This will call the shouldPresentChatViewController when the setup is ready.


    Fogmeister | 2024-10-01 12:57:11 UTC | #3

    Great! Thanks :+1:


    system | 2024-10-31 12:57:52 UTC | #4

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


    This post was migrated from the old Developer Forum.

    ref: 29634