Chat SDK V2 Memory issue iOS



Publication le 18 mai 2022

Hi,

We are using Chat SDK V2 and we see some memory issues. We are presenting the chat as modal and on dismiss we could see instances of `ChatSDK` being retained. The view is getting destroyed properly.

[Strange I am unable to upload any images from the memory graph] so posting some of the contents... as you can see, if I go to the screen around 10 times, you get those many objects retained.

0. ChatSDK(74)

1. ChatEngineStarter (9)

2. ChatFormHandler(9)

3.ZDKChatEngine(9)

4.ZDKChatFormConfiguration(10)

We are building the UI like this 

    func buildUI() throws -> UIViewController {

        // Name for Bot messages

        let messagingConfiguration = MessagingConfiguration()

        messagingConfiguration.name = “Bot"

        let formConfiguration = ChatFormConfiguration(name: .required, email: .required, phoneNumber: .required, department: .required)

        let chatConfiguration = ChatConfiguration()

        chatConfiguration.isAgentAvailabilityEnabled = false

        chatConfiguration.isPreChatFormEnabled = true

        chatConfiguration.chatMenuActions = [.emailTranscript, .endChat]

        chatConfiguration.preChatFormConfiguration = formConfiguration

        

        // Build view controller

        let chatEngine = try ChatEngine.engine()

        return try Messaging.instance.buildUI(engines: [chatEngine], configs: [messagingConfiguration, chatConfiguration])

    }


0

12

12 commentaire

Sounds good Anoop, I've taken a look and responded back. I'll continue engaging via that ticket from here on. 
 
Thanks!

0


Hi Eric Nelson

Added the source code to the ticket itself.

-anoop

0


Hey Anoop,

I just opened up a ticket on your behalf, I've also included instructions in that on how best to send me the application.

Thanks!

0


Hi Eric Nelson,

Yes that would be fine and let me know the right place to upload.

-anoop

0


Hey Anoop,

Sorry I missed your message, mind if I move this into a ticket so that you can share the sample app with me? 

Thanks!

0


Hi Eric Nelson,

I have created a sample app where you can see the issue. Whats the best way to share it with you?

0


Okies which one corresponds to that ? is it this https://github.com/zendesk/ios_sdk_demo_apps/tree/master/ChatSDKSamples ?

0


Hey Anoop,

I haven't been able to replicate this on my side. Would you try using one of our sample applications and let me know if you encounter this issue?

0


Okay , I tried that now using the existing navigationcontroller and result is the same.

0


Hey Anoop,

My assumption on why this is happening is because you're engaging the view from outside the navigation stack. When doing this the app wouldn't have a way of checking if there is an engine running as it's outside the navigation controller. I'd attempt modifying your code to use the navigation controller like in our example and see if that solves your issue. 

0


Vous connecter pour laisser un commentaire.

Vous ne trouvez pas ce que vous cherchez ?

Nouvelle publication