I recently implemented push notifications into my React Native app, which are handled by APNs and FCM for iOS and Android respectively.
I am now trying to implement deep linking into the app, and have had success locally, and have begun trying to implement this into my staging app.
Currently, the React Native side of things is working nicely, and if I click a link on either of my devices with <MY_APP_SCHEME>://messages/:messageId
, it opens the respective chat. This works both locally via Expo and in my staging IPA and APK builds.
However, I am struggling to get this to work with APNs. For Android using FCM, I was simply able to add:
link: <MY_APP_SCHEME>://messages/1
to the notification object, and this works well.
iOS on the otherhand is proving more difficult. I have tried adding link
, url
, action
to the apn.Notification
object in various ways (I am using node-apn
https://github.com/node-apn/node-apn), but clicking the notification when it comes through just opens the app and not the chat/screen I want.
Any help would be appreciated.