Recent searches


No recent searches

Zendesk iOS Messaging SDK not retaining history



Posted Jul 20, 2021

Hey Team,

I am currently integrating the iOS Messaging Zendesk SDK by initialising the SDK with the channel key and launching the ZDKMessaging.instance.messagingViewController on successful initialisation.

I am running into an issue there - The zendesk chat opens up with previous message history and flows ONLY on the first launch of the zendesk viewcontroller instance.

If I close the zendesk chat, and re-open it, I see the zendesk chat view controller with a no previous messages. I can type the message in the input field at the bottom, however, once I hit send, the message isn't seen in the chat window.

 

Here is the attached screenshot of how the blank zendesk chat view controller is seen on the second instance.


1

13

13 comments

image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Amogh,

Sorry you're running into issues! Can you provide the code of your ViewController and any corresponding delegates so we can take a look?

Have a wonderful day!

Eric Nelson | Manager - Developer Advocacy

0


Hey Eric,

Thank you for the reply.

Here is the code :

 

AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

       NSString *zendeskChannelKey = @"___REDACTED____";

       [ZDKMessaging initializeWithChannelKey:zendeskChannelKey completionHandler:^(ZDKMessaging * _Nullable messaging, NSError * _Nullable error) {
    NSLog(@"init complete");
  }];

}

 

And this is in one of the methods in ViewController.m

dispatch_async(dispatch_get_main_queue(), ^{

      UIViewController *viewController = [ZDKMessaging.instance messagingViewController];

      viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle: @"Close"

       style: UIBarButtonItemStylePlain

      target: self

      action: @selector(dismiss)];

      UIViewController *rooterController = [UIApplication sharedApplication].keyWindow.rootViewController;

      nav = [[UINavigationController alloc] initWithRootViewController:viewController];

      urlPressed = callback;

      UIBarButtonItem *backItem = [UIBarButtonItem alloc];

      [backItem setTitle:@"Back"];

      [[nav navigationItem] setBackBarButtonItem:backItem];

      ZDKMessaging.delegate = self;

      [rooterController presentViewController:nav animated:YES completion:^{

        RCTLog(@"in blocks");}];
    });
- (void) dismiss {

  [nav dismissViewControllerAnimated:YES completion:nil];

}

0


Hey @..., any further update on this? This is kind of a bummer, and blocking a release for us.

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey Amogh,

Sorry for the delay. I'm not spotting any glaring issues in these files. It sounds to me like the you're losing the state on close, then the sdk isn't seeing the events in the messagingViewController after reopened. Mind if I move this into a ticket and you send me your app so that I can dig into this fully? If that's not possible a sample app with just the Zendesk specific bits in it would be useful. 

Thanks,
Eric

0


Hey Eric,

Sure, please create a ticket for this.

Here is the google drive link to a sample app project which essentially has only the Zendesk initialisation and showing the zendesk messaging controller - link

Let me know your findings.

Thank you,

Amogh

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Thanks Amogh! I'll pull this into a ticket and reach out to you shortly.

Have a wonderful day!

Eric Nelson | Manager - Developer Advocacy

0


Hi Eric Nelson and Amogh

I know this is an older post, but was wondering if you found the solution after.

0


I had the same issue in the past, in my case the issue was that I've used the wrong channel key

0


image avatar

Mick O'Donnell

Zendesk Product Manager

Hi all,

Looks like there may be different implementation issues at play here, but just to clarify that the new Zendesk SDK for messaging is fully persistent, so it full preserve the entire conversation history indefinitely for that app install. If you authenticate the user, this will be across multiple devices. If you are not experiencing this, you can open a support ticket on support.zendesk.com. We currently don't have any reported issues impacting this aspect of the SDK.

0


I am having the exact same problem reported here. Do we have a resolution for this yet?

0


Mick O'Donnell, was there a ticket opened for this and was there a resolution?

0


image avatar

Mick O'Donnell

Zendesk Product Manager

Hi Harshini,

Yes, we resolved this issue for the other customer through a support ticket. There was no need to release a new version of the SDK, this was more of an issue with that specific implementation. If you are still having issues with the SDK, please open a support ticket, and we can help you to investigate this.

0


Hi Mick O'Donnell,

In our case chat history is getting cleared once the chat ends either because of 15 mins timeout or if either party ends the chat. Is this the expected behaviour and if yes then how can I avoid this from happening? Will user authentication solve this?

Our goal is to make the complete chat history visible for the user.

Thanks

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post