Skip to main content

Hi!
I’ve encountered an issue with configuring push notifications in Intercom on iOS.

I’m using the latest Intercom SDK (18.1.0). According to the documentation, I’ve added IntercomAutoIntegratePushNotifications with the value NO in Info.plist and am manually handling push notifications in the userNotificationCenter(_:didReceive:withCompletionHandler:) method as instructed:
 

func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
let userInfo = response.notification.request.content.userInfo
if Intercom.isIntercomPushNotification(userInfo) {
Intercom.handlePushNotification(userInfo)
}
completionHandler(.noData)
}

However, Intercom notifications are not being handled correctly - it seems like the Intercom.handlePushNotification(_:) function is not being triggered at all. Has anyone faced a similar issue with manually handling push notifications on iOS? I’d appreciate any advice or ideas on what might be going wrong.

Hey there @Akmaral! Emily here, a customer support engineer at Intercom 👋🏼
 

Here are some steps to troubleshoot your issue regarding push notifications 👇

  • Verify that you have integrated push notifications in your app correctly. This includes ensuring that your app prompts users to receive notifications and that the app is listed in the iOS Settings > Notifications. If it's not listed, push notifications may not have been implemented correctly in your app.
  • Confirm that you have requested permission to send push notifications and have registered the device token of your user in your AppDelegate. If the failure block of the setDeviceToken call is executed, check against Intercom's list of error codes to help debug the issue.
  • Ensure that you have enabled the Push Notifications capability in Xcode, as this is necessary for push notifications to work.

If after following these steps, you find that the Intercom.handlePushNotification(_:) function is still not being triggered, it may suggest a problem with how the device token is being handled or registered in your app. 
You can learn more about registering device tokens here 😁

Hope this helps!


Reply