Updated March 21, 2018

4 Questions to Ask When Choosing a Push Notification Provider for a React Native App

Originally publish on medium.com.

0

Push notifications rock. Twice a day I’m reminded about how I can win some 💰 💰 💰 by playing a trivia game. Or I’m sent a daily news digest. Or Twitter tells me someone I follow liked a tweet (🙄).

But how do I do it in my app? Specifically in my React Native app?

If you’ve looked into push notifications you’ve likely decided you don’t want to manage it all on your own, especially if you’re targeting both iOS and Android.

But that brings up the question — who do I choose? There are a lot of options.

Here’s a few questions to ask yourself.

Question #1: Are you using Expo?

If no, move on to question 2.

If yes, then use their push notification service! A few things about their push notification service

  • It’s crazy easy to setup (as with some many things related to Expo).
  • There are multiple server sdks to easily integrate with your backend (and a REST API if you’re using something different).
  • They’ve got an awesome push notification tool that can help you build push notifications without having to deal with the backend (great for testing & prototyping).
  • The doc/guide is incredible clear.
  • Oh, and it’s free.

Push Notifications | Expo latest documentation

Question #2: Privacy or Price?

If privacy is your #1 priority, move on to question 3.

If price is your #1 priority, I see you as having two primary options (that I’m familiar with, I’m sure there are others).

OneSignal

OneSignal is a service that delivers push notifications. They

  • Are free (unlimited devices, unlimited notifications, testing, localization, etc.)
  • Are used by a lot of big name companies
  • Have a nice API and nice web dashboard (nice for non-developers to be able to send push notifications)
  • Have, overall, a great developer experience (speaking from experience)

The con? What they do with your data. They’re a free service — but they’ve got to make money. How? By selling data it collects.

OneSignal makes money by selling data to advertisers and research companies. We also offer paid service options for clients that require increased data privacy.

Source

Is this inherently bad? No! They provide a great service and a great developer experience. But it’s something to consider. They do provide a paid service that require increased data privacy. No personal experience on that front.

OneSignal - Multi-platform Push Notification Service

Firebase Cloud Messaging

Firebase Cloud Messaging (Firebase is a Google product) gives you a way to send push notification from within the Google environment. As far as I can tell it’s completely free and you (seemingly) don’t need to be using Firebase in any other capacity to use it.

I don’t have a ton of experience on this front but it seems that third party packages in React Native struggle a bit with integration. I might be wrong on this though.

Correction: I am wrong about this! Chris Bianca mentioned in a comment that there have been changes to the push notification integration in react-native-firebase. More info.

Firebase Cloud Messaging | Firebase

Interested in learning some push notification best practices? I put together a quick video sharing a few must-follow rules.

Question #3: Are You in the AWS Ecosystem?

You’ve got a few options here. In a past project I worked with AWS Simple Notification Service (SNS). It’s powerful but, compared to other options, requires much more configuration.

The other drawback is that there isn’t any way to easily send non-system generated messages (no admin interface). It’s cheap to use though!

**Amazon Simple Notification Service (SNS) | Event Notifications for Distributed Applications

Also, in the AWS world is AWS Amplify Push Notifications. This just came out in the last few weeks so I don’t have experience with it but, if you’re using AWS Amplify already, this could be a great option for you!

Push Notifications

Question #4: Why Do You Have so Many Questions? 😄

Now that we’re here you’re going to have to do more research and make the decision on your own. There are multiple options that you could choose from (including rolling your own system). I won’t leave you completely hanging though. Here’s some other services and packages that may help you out.

Push notifications are hard. Not only setting them up, but knowing how to use them. I put together a quick video sharing some best practices for push notifications. Get it here. Your users will thank you!

React Native School Logo

React Native School

Want to further level up as a React Native developer? Join React Native School! You'll get access to all of our courses and our private Slack community.

Learn More