Member-only story
React Native Push Notifications
Adding Push Notifications to a React Native iOS project using Amazon Pinpoint, AWS Amplify & AWS Mobile Hub.
This post is out of date. I would recommend now using the new documentation located at https://docs.amplify.aws/lib/push-notifications/getting-started/q/platform/js
AWS recently added the ability to send push notifications to the AWS Amplify Library, making it possible to integrate with the Amazon Pinpoint Push Notifications services for both the iOS and Android platforms.
This adds to the existing services that Amplify supports that now also includes Authorization with Amazon Cognito, storage with Amazon S3, & Analytics with Amazon Pinpoint among other things.
In this post, we’ll walk through how to add push notifications to an React Native iOS project.
We will not be covering Android, which will come in a separate post, because the two platforms are so different and have completely different configurations & workflows.
To see the full end to end implementation, including configuring the Apple certificates & provisioning profile, please see the below video.
Getting Started
To view full documentation, click here.
The first thing we need to do is create a new React Native project using the React Native CLI. The reason we will not be using Expo / Create React Native App for this is because we will be configuring the native project quite a bit:
react-native init RNPushTest
cd RNPushTestTo create our AWS Mobile Hub project we’ll be using the AWSMobile CLI. If you do not already have this installed, let’s go ahead and install and configure it:
npm i -g awsmobile-cli
awsmobile configureIf you’ve never configured AWS before, check out this 2-minute video showing you how to quickly configure the AWSMobile CLI.
Now, we’ll use the AWSMobile CLI to create a new project:
awsmobile init
