Recent searches


No recent searches

Can't receive push notifications through Zendesk Messaging SDK



Posted May 10, 2022

Been trying to get push notifications working through the messaging SDK on ios but can't seem to make it work. I've followed the instructions in the link above and was able to validate that non-zendesk push notifications are working using this tool as suggested in this previous post.

Based on some app-level logging, the below function does seem to be working so presumably, ZDKPushNotifications is registering the push notification token

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken 

 

And by using that push notification testing tool linked above, I was able to send push notifications to my app on the device using the Production push notification certificate, and confirm that the following function was being called:

- (void)userNotificationCenter:(UNUserNotificationCenter *)center
       willPresentNotification:(UNNotification *)notification
         withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler

 

Based on the above, I feel fairly confident that any apple/APNS configurations are being set correctly. So not really sure what's not working properly at the Zendesk level. Is there something I need to turn on in Zendesk admin? Any help would be appreciated.

 


0

5

5 comments

I've been trying to get Push Notifications working on my app via the Zendesk Messaging IOS SDK and have found that Zendesk don't seem to have an option of sending PNs via the Sandbox APN.. so you basically need to deploy the app to TestFlight or have it published as an Ad Hoc build to see the PNs. It's quite frustrating as it makes it nearly impossible to test PN behaviour properly. I wonder if this was your issue?

0


Hey Malcolm, thanks for the suggestion although I did realize that the sandbox certificate doesn't work for Zendesk so I've been testing with adhoc builds and the production cert for the last couple of days. Does lead to a bit of a slower development cycle unfortunately. So at this point, I don't think that's the issue.

Were you able to get push notifications working at the end? Do you remember if there was something you did that differed from the Zendesk provided sample code?

0


I did follow the setup guide here https://developer.zendesk.com/documentation/zendesk-web-widget-sdks/sdks/ios/push_notifications/ quite closely, but the main difference being that I'm having to integrate this with some existing code that we have that handles PNs from other providers. I also request PN permission just before opening the chat window to make sure users are registered. Otherwise it's pretty much as per the guide. I get the PNs working when I deploy to TestFlight. It's a total pain though as very slow to develop. Seems to be quite an outdated way of handling PNs... and very annoying that at a minimum there isn't a toggle for switching to Sandbox APN in the Zendesk admin. I've previosuly integrated Smooch, and I seem to remember that this did have the option - Zendesk Messaging seems to be built on Smooch so not sure why they haven't supported this.

0


Hm good to know that it at least is working for you. Just to double check, a simple way to test if this is working could be to just create an ad-hoc build, then update the Messaging ticket as an agent right? That should kick off a push notification with the agent's latest message?

0


Yeah, the following should work (does for me):

  • Open messaging view controller in app, send a message. Close app, or navigate away from the chat view.
  • In the Zendesk Agent view, reply to the message.
  • A push notification should appear. Note that PNs don't appear if you are still in the chat view. However they should if on a different view, or if the app is closed.

 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post