wix / react-native-notifications

React Native Notifications
MIT License
3.25k stars 764 forks source link

Does FCM work with this package in iOS? #1036

Open stee1ix opened 6 months ago

stee1ix commented 6 months ago

Does FCM work with this package in iOS?

I'm using Firebase Web SDK with react native. FCM notifications is working fine on android. But on iOS I'm not receiving any events.

AugustoAleGon commented 6 months ago

Short answer is not. Since the token that you get from notifications are APN and you need the FCM tokens.

AugustoAleGon commented 6 months ago

After a checking a few libraries. What you need is install react-native-firebase/messaging and use the method getToken instead of the react-native-notifications method. Just install the library and follow the steps.

stevelegends commented 5 months ago

I have successfully integrated the iOS version with https://github.com/react-native-push-notification/ios & firebase messaging. The pull request is coming soon.

stee1ix commented 5 months ago

@AugustoAleGon Use getToken for android as well? Should I not use the registerRemoteNotificationsRegistered function from react-native-notifications?