iOS handlePushMessage
See original GitHub issueHi All,
First off, thanks to all who contribute to this project.
I recently implemented push notifications through Intercom and I’m receiving them successfully on my test device. I’m trying to send push messages with an iOS link to open a specific screen in my app and I’m not sure how/where to put my routing logic.
I see there is a method called handlePushMessage
, but I don’t see any documentation on how to use it. I’m trying something like this:
AppState.addEventListener('change', this.handleAppStateChange)
handleAppStateChange(currentAppState) {
Intercom.handlePushMessage((a) => {
console.log('a: ', a)
})
}
I’m not getting any console log. I’m assuming I should be able to call this method and get back the link that I had set on the push message so I could perform the appropriate routing.
If anyone could steer me in the right direction, I would greatly appreciate it.
Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:10
Top Results From Across the Web
Handling Notifications and Notification-Related Actions
Deliver notifications that wake your app and update it in the background. PushKit. Respond to push notifications related to your app's complications, file ......
Read more >How to handle push notification in swift? - ios - Stack Overflow
To handle push notifications when arrived in your iOS application is tricky part in order to take their full advantage.
Read more >Push Notifications Tutorial: Getting Started - RayWenderlich.com
Note: This tutorial covers the basics of how to use push notifications for iOS. For an in-depth look and all the details you...
Read more >How to Add Push Notifications into an iOS App - OneSignal
Follow this step-by-step guide to add push notifications to your iOS app for free with OneSignal.
Read more >Handling iOS Push Notifications: The Not So Apparent Side
The app must specify what capabilities it supports. To receive push notifications, the “Push Notifications” capability must be turned on.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A little more context:
I’m using branch.io to handle deep linking and have it working with another push notification platform (onesignal). Our goal is to move from one signal to intercom for sending manual push notifications.
I’m able to receive push notifications (using intercom and this library) on both iOS and Android. The only difference is the handling of the deep link. Android just worked out of the gate, so when I tap on the push notification, it takes me to the correct screen in the app. For iOS, tapping the push notification only opens the app and doesn’t carry over the deep link.
@ZeerakHameem32 , If the application is opened by the deep link you can access
getInitialUrl
method of the Linking module. See docs here.If you have configured everything correctly this should work. I hope this helps you.