Why we can’t receive push notifications from expo after using ‘expo eject’ for iOS standalone

Originally, we wanted to see if using ‘expo eject’ (with option ‘use Expo SDK’) will be able to eject an iOS standalone app where it can successfully receive Expo notifications.

Our trial indicates that is not possible.

In the original RN code where we have Expo API attached, right after we log in, we use Notifications.getExpoPushTokenAsync (imported from expo), to get a valid push token. That is how the Expo Notification server can push towards iOS and Android devices.

However, in the expo ejected iOS client, we ran into an error while trying to get this push token. Specifically the error says “unsupported URL”. This is probably because it does not recognize the url of our iOS client.

Hence, in order to apply native receive push notifications, and then pass that data into RN, we must use:

1) ‘expo detach’
2) use RCTPushNotificationManager for iOS client
3) use PushNotificationIOS library from React Native to retrieve notification data