|
| 1 | +--- |
| 2 | +title: Push Notifications |
| 3 | +plan: engage-premier |
| 4 | +--- |
| 5 | + |
| 6 | +This page walks you through the process of setting up mobile push notifications using Segment, Twilio, and Firebase/Apple Developer. |
| 7 | + |
| 8 | +## Before you begin |
| 9 | + |
| 10 | +Push notifications in Engage rely on several dependencies. This page provides a high-level overview of the steps required to set up these dependencies and links to the documentation you'll need to follow to complete setup and configuration. |
| 11 | + |
| 12 | +## Overview |
| 13 | + |
| 14 | +## 1. Set up analytics for push notifications |
| 15 | + |
| 16 | +Before you can send push notifications, you'll need to set up analytics to track user interactions. In this step, you'll integrate Segment's mobile SDK into your app. |
| 17 | + |
| 18 | +### Add the Segment base SDK |
| 19 | + |
| 20 | +This section outlines the process for adding Segment's base SDK to your app, including the Analytics Kotlin, Analytics Swift, and React Native libraries. |
| 21 | + |
| 22 | +#### Kotlin |
| 23 | + |
| 24 | +Follow these steps to integrate Analytics Kotlin: |
| 25 | + |
| 26 | +1. Create a source by navigating to **Connections > Sources > Add Source**. |
| 27 | +2. Search for **Kotlin (Android)**, then click **Add source**. |
| 28 | +3. Add the Analytics dependency to your `build.gradle` file. |
| 29 | +4. Initialize and configure the client according to your requirements. |
| 30 | +5. Add the following permissions to `AndroidManifest.xml`: |
| 31 | + |
| 32 | +```java |
| 33 | + <uses-permission android:name="android.permission.INTERNET"/> |
| 34 | + <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> |
| 35 | + |
| 36 | +``` |
| 37 | + |
| 38 | +For detailed instructions on integrating Analytics Kotlin, follow the steps in the [Analytics Kotlin getting started section](/docs/connections/sources/catalog/libraries/mobile/kotlin-android#getting-started). |
| 39 | + |
| 40 | + |
| 41 | +#### Swift |
| 42 | + |
| 43 | +Follow these steps to integrate Analytics-Swift for iOS & Apple: |
| 44 | + |
| 45 | +1. Create a source by navigating to **Connections > Sources > Add Source**. |
| 46 | +2. Search for **Apple**, then click **Add source**. |
| 47 | +3. Add the Analytics dependency to your application using either Swift package manager or Xcode. |
| 48 | +4. Initialize and configure the Analytics-Swift client. |
| 49 | + |
| 50 | +For detailed instructions on integrating Analytics-Swift, follow the steps in the [Analytics-Swift getting started section](/docs/connections/sources/catalog/libraries/mobile/apple#getting-started). |
| 51 | + |
| 52 | +#### React Native |
| 53 | + |
| 54 | +Follow these steps to integrate the React Native library: |
| 55 | + |
| 56 | +1. Create a source by navigating to **Connections > Sources > Add Source**. |
| 57 | +2. Search for **React Native**, then click **Add source**. |
| 58 | +3. Use yarn or npm to install `@segment/analytics-react-native`, `@segment/sovran-react-native` and `react-native-get-random-values`. |
| 59 | +4. Initialize and configure the Analytics React Native client. |
| 60 | + |
| 61 | +For detailed instructions on integrating Analytics for React Native, follow the steps in the [Analytics for React Native started section](/docs/connections/sources/catalog/libraries/mobile/react-native#getting-started). |
| 62 | + |
| 63 | +## Add the Engage SDK Plugin |
| 64 | + |
| 65 | +Next, you'll add the Engage SDK Plugin to your application. |
| 66 | + |
| 67 | +### Instructions for iOS |
| 68 | + |
| 69 | +These are the high-level steps required to add the Engage Plugin for iOS: |
| 70 | + |
| 71 | +1. Add the Engage SDK Plugin dependency in your `package.swift` file or using Xcode's Swift packages. |
| 72 | +2. Add or modify the methods in the [Additional setup section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation. |
| 73 | + |
| 74 | +The previous steps are required. For detailed instructions on adding the Engage SDK Plugin for iOS, as well as for configuration options, follow the steps in the [getting started section](https://github.com/segment-integrations/analytics-swift-engage#additional-setup){:target="_blank"} of Segment's Twilio Engage Plugin documentation on GitHub. |
| 75 | + |
| 76 | + |
| 77 | +### Instructions for Android |
| 78 | + |
| 79 | +1. Follow the instructions in the [getting started section](https://github.com/segment-integrations/analytics-kotlin-engage#getting-started){:target="_blank"} of Segment's Twilio Engage Destination documentation on GitHub. |
| 80 | + |
| 81 | + |
| 82 | +## Configure Firecloud/Firebase or Apple Developer |
| 83 | + |
0 commit comments