Recent searches


No recent searches

Zendesk Messaging iOS SDK - endless spinner



Posted May 12, 2022

I'm currently having an issue with the Zendesk Messaging iOS SDK where I see a spinner that does not dismiss after doing the following:

  • Open chat view controller (renders as expected).
  • Dismiss view.
  • Open view again (shown spinner that does not go away). I also see the chat input box and adding text to this does actually get sent as expected, but I cannot see any new messages and the spinner does not go away.
  • This behaviour continues until I completely restart my app.

So, I'm wondering if anyone else has seen this behaviour, and if so how do I deal with it? Is there a way of refreshing the view?

The following screenshot shows the spinner:


0

5

5 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Malcolm,

What version of the SDK are you running? Can you enable the logger to see if this provides any context to what the issue is?
 
Thanks!

0


I'm using the latest version of the SDK. I had full debug logging on but didn't see any errors as such - although I did see some 202 responses from the Smooch API server.

It's also worth noting that I wrap the returned view controller in a UINavBarController and have attached a UIBarButtonItem to that so that we can dismiss the chat view. It's triggered from the user pressing on a tab bar button and appears as a modal.

I tried a couple of things:

- I stored the returned View Controller in a singleton so we only ever requested it once. This fixed the problem, but created another in that new messages were always marked as read even if the user wasn't in the chat view (presumably because it's still active in memory).

- The second thing I tried was to make set the nav controller and Zendesk messaging view controller to nil after dismissing it. This seems to have improved things in that I don't get the endless spinner any more although I need to test this more. Was clutching at straws a bit here so tried manually destroying resources - which seems to help. Difficult to know exactly what's going on as the SDK is pretty black box really.

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Malcolm, 

The second thing seems to be the way I'd go. To confirm I'm assuming you're using a custom UI? 

0


Having the same issue but using SwiftUI so can't set the controller to nil. I'm able to present in a sheet, but cannot present in a navigation controller. This is not an issue on iOS 16, only iOS 15.

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Carlton, 

I see that you have a ticket ongoing for this issue. I'll be taking that over and look forward to working with you via that.

Thanks!

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post