You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5.[Configure mobile push in Engage](#5-configure-mobile-push-in-engage).
20
21
21
22
## 1. Set up analytics for mobile push
22
23
@@ -224,15 +225,101 @@ Now that you've integrated Analytics for Kotlin, follow these steps to add the E
224
225
225
226
The previous steps are required. For configuration options, including subscription statuses and customized actions, visit 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.
226
227
227
-
## 3. Configure push credentials
228
+
Next, you'll configure your iOS and Android push credentials for use with Twilio Notify and Twilio Notifications.
228
229
229
-
In this step, you'll configure your iOS and Android push credentials for use with Twilio Notify and Twilio Notifications.
230
+
## 3. Configure iOS push notifications
230
231
231
-
### Configure iOS push notifications
232
+
### 3a. Set up an App ID
232
233
233
-
Follow the steps in Twilio's [How to Configure iOS Push Notifications documentation](https://www.twilio.com/docs/notify/configure-ios-push-notifications){:target="_blank"}.
234
+
Before you begin, log into your [Apple development account](https://developer.apple.com/account){:target="_blank"} and click on **Identifiers** under the **Certificates, Identifiers & Profiles** section. This will show a list of identifiers, including App IDs.
234
235
235
-
### Configure Android push notifications
236
+
#### Option 1: Use an existing App ID
237
+
238
+
1. If your App ID is already on this list, click on it; a list of capabilities will pop up.
239
+
2. Check the **Push Notifications** option.
240
+
3. Ignore the **Configure** button for now. Click **Save**.
241
+
242
+
#### Option 2: Create a new App ID
243
+
244
+
1. If your App ID isn’t on this list, click the **+** symbol to add a new App ID.
245
+
2. Choose **App IDs** and click the **Continue** button.
246
+
3. Give your app a description.
247
+
4. Enter an Explicit Bundle ID that matches the bundle identifier (such as `com.twilio.notify.NotifyQuickstart`) of your app in Xcode.
248
+
5. Under **Capabilities**, check **Push Notifications**.
249
+
6. Click **Continue**.
250
+
7. Click **Register** to confirm and create your new App ID.
251
+
252
+
### 3b. Create a certificate
253
+
254
+
Next, you’ll create a push notification certificate, which lets your app receive notifications. You can either make a development certificate or a production certificate. This guide explains how to make a development certificate. Segment recommends that you use Xcode managed certificates.
255
+
256
+
#### Option 1: Use an Xcode managed certificate
257
+
258
+
1. In your Xcode project, go to the **General** pane of the target for your iOS application.
259
+
2. In the **Signing** section, check **Automatically manage signing**.
260
+
3. If you are using the Quickstart app and see a provisioning error message, you may need to rename the bundle ID to a unique identifier. To do so, [give your bundle a new name](https://developer.apple.com/account/resources/certificates/list){:target="_blank"}, then enter your new identifier in the **Identity** section of the General pane.
261
+
4. Go to the **Capabilities** tab and make sure that Push Notifications are enabled.
262
+
5. Verify that you successfully created your certificates:
263
+
- Sign in to the Apple developer portal and click on **Certificates, IDs & Profile**. In the **Certificates** section, select **Development** or **Production**, depending on the type of certificate you want to verify.
264
+
- Alternatively, go to **Applications > Utilities > Keychain Access** and select **Certificates**. Search for `iPhone`, and verify that your certificate has a disclosure triangle, which indicates that your private key exists in the keychain.
265
+
266
+
#### Option 2: Manually create a certificate
267
+
268
+
Segment recommends that you use Xcode managed certificates for your application. If you prefer to create your certificate manually, follow these steps:
269
+
270
+
1. Add a certificate on the [Apple Developer Portal](https://developer.apple.com/account/resources/certificates/add){:target="_blank"}.
271
+
2. Under **Services**, select **Apple Push Notification service SSL (Sandbox & Production)**, then click **Continue**.
272
+
3. In the text box, select the App ID you previously created, then click **Continue**.
273
+
4. You're prompted to create a Certificate Signing Request (CSR) and given instructions on how to do it. Create one.
274
+
5. Once you've created a CSR, click **Continue**.
275
+
6. Upload the CSR, then click **Generate** to generate your certificate.
276
+
277
+
You just created an Apple Development iOS Push Services certificate, which you can now download and double-click to add to your Mac’s keychain.
278
+
279
+
### 3c. Create a credential for Twilio
280
+
281
+
1. On your Mac, go to **Applications > Utilities > Keychain Access**, then select **My Certificates**.
282
+
2. Right-click your new certificate. It should be labeled **Apple Development iOS Push Services**.
283
+
3. Choose **Export**.
284
+
4. Save your credential file as `cred.p12`; leave the password blank.
285
+
286
+
You'll extract your certificate key and private key from this file — you need these two keys to create a Twilio credential. First, run this command in Terminal:
`key.pem` is your private key file. Next, run this command to process this key:
299
+
300
+
```zsh
301
+
openssl rsa -in key.pem -out key.pem
302
+
```
303
+
304
+
You can now paste your credentials into the modal found in the Twilio Console. Make sure that you strip anything **outside** of the `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` boundaries and outside of the `-----BEGIN RSA PRIVATE KEY-----` and `-----END RSA PRIVATE KEY-----` boundaries before pasting your credentials. Check the **Sandbox** button if you made a development certificate. Sandbox is synonymous with development mode.
305
+
306
+
> warning ""
307
+
> Once you save a credential, the `CERTIFICATE` and `PRIVATE KEY` fields are hidden for security reasons.
308
+
309
+
After you've pasted your credentials, click **Save**. You should see an SID appear on the new page; copy it to your clipboard, as you'll need it in the next step.
310
+
311
+
312
+
### 3d. Configure your Twilio Service to use your APNS credentials
313
+
314
+
Twilio lets you build multiple applications within a single account. To separate those applications, you need to create Service instances that hold all the data and configuration for a given application.
315
+
316
+
To do so, you'll need to configure your Service instance to use the Credential that contains your APNS certificate and private key. You can do that using the Services page in the Console. You’ll need to update your Service with the Twilio Push Credential SID.
317
+
318
+
If you're just getting started, set up the APN credential first, then create your Service by clicking the blue plus button on the [Services Console](https://console.twilio.com/us1/develop/notify/services?frameUrl=%2Fconsole%2Fnotify%2Fservices%3Fx-target-region%3Dus1&_ga=2.170545120.1341805708.1700099403-1979911827.1631664239&_gl=1*1msrgrt*_ga*MTk3OTkxMTgyNy4xNjMxNjY0MjM5*_ga_RRP8K4M4F3*MTcwMDEwNTYwOC45Ny4xLjE3MDAxMDU2MjAuMC4wLjA.){:target="_blank"} page.
319
+
320
+
For more information, view Twilio's [How to Configure iOS Push Notifications documentation](https://www.twilio.com/docs/notify/configure-ios-push-notifications){:target="_blank"}.
321
+
322
+
## 4. Configure Android push notifications
236
323
237
324
Follow the steps in Twilio's [Configuring Android Push Notifications](https://www.twilio.com/docs/notify/configure-android-push-notifications){:target="_blank"}.
238
325
@@ -246,14 +333,14 @@ During Step 5, [Upload your API Key to Twilio](https://www.twilio.com/docs/notif
246
333
247
334
With your server key copied, finish steps 5 and 6 in the Twilio documentation.
248
335
249
-
## 4. Configure mobile push in Engage
336
+
## 5. Configure mobile push in Engage
250
337
251
338
Follow these steps to set up mobile push in Twilio Engage.
252
339
253
-
### 4a. Set up Twilio credentials
340
+
### 5a. Set up Twilio credentials
254
341
255
342
> success ""
256
-
> Follow the steps in 4a only if you're new to Twilio Engage Premier. If you've already [configured messaging services](/docs/engage/onboarding/#generate-an-api-key-and-select-your-messaging-services) as part of Twilio Engage Premier onboarding, you can skip to 4b.
343
+
> Follow the steps in 5a only if you're new to Twilio Engage Premier. If you've already [configured messaging services](/docs/engage/onboarding/#generate-an-api-key-and-select-your-messaging-services) as part of Twilio Engage Premier onboarding, you can skip to 5b.
257
344
258
345
1. In your Twilio console, select the **Account** dropdown menu, then **API keys & tokens**.
259
346
2. On the Auth tokens & API keys page, click **Create API key**.
@@ -267,7 +354,7 @@ Follow these steps to set up mobile push in Twilio Engage.
267
354
12. Click **Verify**, then select the messaging services you want to use in your space.
268
355
13. Click **Save Twilio Account.**
269
356
270
-
### 4b. Create a new push service
357
+
### 5b. Create a new push service
271
358
272
359
Complete mobile push onboarding by creating a new push service:
273
360
@@ -277,6 +364,6 @@ Complete mobile push onboarding by creating a new push service:
277
364
4. Name the push service, select or create APN and FCM credentials, then click **Create Push Service**.
278
365
5. Your new messaging service appears in the **Add messaging services** dropdown. Select it, then click **Save**.
279
366
280
-
## 5. Build a mobile push template
367
+
## Build a mobile push template
281
368
282
369
Now that you've completed mobile push setup, you're ready to [build a mobile push template](/docs/engage/content/mobile-push/).
0 commit comments