Skip to main content

I configured IOS for intercom correctly with APNS Key but still i didn't receive any notification, if the agent send a message to my iphone

Hey ​@Dhrupad Purohit 👋 I see you got in touch with the team via the Messenger and gotten this resolved 💬✅

 

For anyone else facing this issue - background mode push notification capabilities from Xcode needed to enabled along with some changes in AppDelegate.swift file, like below:

 

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { Intercom.setDeviceToken(deviceToken) NotificationCenter.default.post(name: .capacitorDidRegisterForRemoteNotifications, object: deviceToken) }

func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { NotificationCenter.default.post(name: .capacitorDidFailToRegisterForRemoteNotifications, object: error) }

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: oAnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { NotificationCenter.default.post(name: Notification.Name.init("didReceiveRemoteNotification"), object: completionHandler, userInfo: userInfo) }


For more information on iOS Push Notifications, you can check out our Developer Documentation here 📌


Reply