As far as I know, the Expo push notification service/ tokens wouldn’t work once you’ve ejected.
One nice thing about Expokit is that it already has push notification libraries built-in (it needs them because Expo push notifications eventually become APNS/ FCM/ GCM behind the scenes). I don’t recall this being well-documented in the Expo doc, but I was able to get them working in Expokit. As I recall the steps were:
iOS:
- Just add the push notification entitlement to your Expo client. You’ll notice in AppDelegate.m that all of the push notification delegate methods are already wired up.
Android:
- Add the FCM service stuff to your AndroidManifest.xml (see Configura un'app client Firebase Cloud Messaging su Android)
- in AppConstants.java, set FCM_ENABLED to true
- No need to edit any other Java- those code paths are executed based on the FCM_ENABLED flag.
Hopefully I’m not missing any steps there- it’s been a little while since I did this.
Then, in your JS, you can import Expo.Notifications, and call Notifications.getDevicePushTokenAsync()
to get your native token and do whatever you need to do with it.