Clarification of some of the functions in the iOS SDK

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

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.

1 Like

Great! Thanks :+1:

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