I am successfully able to send APNs to apple devices. I have coded up my app in react native. When someone clicks on the notification, I want to redirect them to a deep link I have configured my app to recognise - ne://page/id
via deep linking, I don't need help with that. How do I redirect a notification click to a link ?
I have tried everything from my end. I looked at the official documentation here - it saysn nothing about urls and redirection - https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification
Moreover, I have using the apn-node library to send notifications via my server. Their notification docs have no url option, just something called urlArgs
.
notification.payload = {
url: "https://www.google.com"
}
parse the URL from the userInfo object in didReceiveRemoteNotification delegate method of AppDelegate
Open the URL in an in-App WebView or Safari
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With