The Push Notifications category allows you to integrate push notifications in your app with Amazon Pinpoint targeting, campaign, and journey management support. You can segment your users, trigger push notifications to your app, and record metrics in Pinpoint when users receive or open notifications. Amazon Pinpoint helps you to create messaging campaigns and journeys targeted to specific user segments or demographics and collect interaction metrics with push notifications.

import reactNativeExpoCallout from '/src/fragments/lib/push-notifications/react-native/getting_started/expo-callout.mdx';

<Fragments fragments={{ 'react-native': reactNativeExpoCallout }} />

## Prerequisites

import androidPreReq from '/src/fragments/lib/push-notifications/android/getting_started/10_pre_req.mdx';
import crossPlatformPreReq from '/src/fragments/lib/push-notifications/common/getting_started/cross-platform-prereq.mdx';
import iosPreReq from '/src/fragments/lib/push-notifications/ios/getting_started/10_pre_req.mdx';

<Fragments
  fragments={{
    android: androidPreReq,
    flutter: crossPlatformPreReq,
    ios: iosPreReq,
    'react-native': crossPlatformPreReq
  }}
/>

import iosSetEntitlements from '/src/fragments/lib/push-notifications/ios/getting_started/20_set_entitlements.mdx';

<Fragments fragments={{ ios: iosSetEntitlements }} />

import iosCreateAppDelegate from '/src/fragments/lib/push-notifications/ios/getting_started/30_create_app_delegate.mdx';

<Fragments fragments={{ ios: iosCreateAppDelegate }} />

## Set up backend resources

To use Push Notifications with Amplify, you have the option to either have the Amplify CLI setup resources for you, or you can use an existing Amazon Pinpoint resource in your AWS account.

<BlockSwitcher>
<Block name="Amplify CLI">

> Prerequisite: [Install and configure the Amplify CLI](/cli/start/install)

<Callout warning>

Push Notifications requires version **10.8.0+** of the Amplify CLI. You can check your current version with `amplify -version` and upgrade to the latest version with `amplify upgrade`.

</Callout>

To start provisioning push notification resources in the backend, go to your project directory and execute the command:

```sh
amplify add notifications
```

import androidCliResources from '/src/fragments/lib/push-notifications/android/getting_started/20_cli_resources.mdx';
import iosCliResources from '/src/fragments/lib/push-notifications/ios/getting_started/40_cli_resources.mdx';
import flutterCliResources from '/src/fragments/lib/push-notifications/flutter/getting_started/20_cli_resources.mdx';
import reactNativeCliResources from '/src/fragments/lib/push-notifications/react-native/getting_started/20_cli_resources.mdx';

<Fragments
  fragments={{
    android: androidCliResources,
    flutter: flutterCliResources,
    ios: iosCliResources,
    'react-native': reactNativeCliResources
  }}
/>

</Block>
<Block name="Existing resources">

import androidExistingResources from '/src/fragments/lib/push-notifications/android/getting_started/30_existing_resources.mdx';
import flutterExistingResources from '/src/fragments/lib/push-notifications/flutter/getting_started/30_existing_resources.mdx';
import iosExistingResources from '/src/fragments/lib/push-notifications/ios/getting_started/50_existing_resources.mdx';
import reactNativeExistingResources from '/src/fragments/lib/push-notifications/react-native/getting_started/30_existing_resources.mdx';

<Fragments
  fragments={{
    android: androidExistingResources,
    flutter: flutterExistingResources,
    ios: iosExistingResources,
    'react-native': reactNativeExistingResources
  }}
/>

</Block>
</BlockSwitcher>

## Install Amplify Libraries

import androidInstallLib from '/src/fragments/lib/push-notifications/android/getting_started/40_install_lib.mdx';
import flutterInstallLib from '/src/fragments/lib/push-notifications/flutter/getting_started/40_install_lib.mdx';
import iosInstallLib from '/src/fragments/lib/push-notifications/ios/getting_started/60_install_lib.mdx';
import reactNativeInstallLib from '/src/fragments/lib/push-notifications/react-native/getting_started/40_install_lib.mdx';

<Fragments
  fragments={{
    android: androidInstallLib,
    flutter: flutterInstallLib,
    ios: iosInstallLib,
    'react-native': reactNativeInstallLib
  }}
/>

import reactNativeIntegrateNativeModule from '/src/fragments/lib/push-notifications/react-native/getting_started/50_integrate_native_modules.mdx';

<Fragments  fragments={{ 'react-native': reactNativeIntegrateNativeModule }} />

## Initialize Amplify Push Notifications

import androidInitPN from '/src/fragments/lib/push-notifications/android/getting_started/50_init_push_notifications.mdx';
import flutterInitPN from '/src/fragments/lib/push-notifications/flutter/getting_started/50_init_push_notifications.mdx';
import iosInitPN from '/src/fragments/lib/push-notifications/ios/getting_started/70_init_push_notifications.mdx';
import reactNativeInitPN from '/src/fragments/lib/push-notifications/react-native/getting_started/60_init_push_notifications.mdx';

<Fragments
  fragments={{
    android: androidInitPN,
    flutter: flutterInitPN,
    ios: iosInitPN,
    'react-native': reactNativeInitPN
  }}
/>
