Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote Push Notifications in React Native for both Android and IOS

I am new to react native and I have built an app for magazines and catalogs which are loaded from my online hosting server (GoDaddy). I want to implement push notification in my app from that server on both android and IOS. Where should I begin and what are my options?

like image 522
Daniyal Awan Avatar asked Mar 18 '18 09:03

Daniyal Awan


People also ask

Does React Native work on both iOS and Android?

React Native combines the best parts of native development with React, a best-in-class JavaScript library for building user interfaces. Use a little—or a lot. You can use React Native today in your existing Android and iOS projects or you can create a whole new app from scratch.


1 Answers

You can use services such as onesignal & fcm. Here i am sharing you some libaries for push notification

https://github.com/geektimecoil/react-native-onesignal (one signal)

You can use the below library for fcm, if you need any other firebase services such as authentication, dynamic links etc.. go for this

https://github.com/invertase/react-native-firebase (fcm)

If you just need only push notification services, you can use

https://github.com/evollu/react-native-fcm

I personally suggest you the last one, because i am using this in all of my apps and enjoying better experience with it..

note : all the above has support for both android and ios

this article will be helpfull for integration

https://medium.com/differential/how-to-setup-push-notifications-in-react-native-ios-android-30ea0131355e

Edited in 2020, last repo suggested personally is no longer maintained now. It's deprecated, as said on their repository. For future viewers, please prefer the second last package, i.e. react-native-firebase (fcm)

like image 51
Manzoor Samad Avatar answered Oct 20 '22 16:10

Manzoor Samad