Learning objectives
In this lesson, you will
- Register App ID with the Apple Push Notification service (APNs).
- Create a channel configuration in Journey Optimizer.
- Update your schema to include push messaging fields.
- Install and configure the Journey Optimizer tag extension.
- Update your app to register the Journey Optimizer tag extension.
- Validate setup in Assurance.
- Send a test message from Assurance
- Define your own push notification event, journey, and experience in Journey Optimizer.
- Send your own push notification from within the app.
Setup
Register App ID with APNs
The following steps are not Adobe Experience Cloud-specific and are designed to guide you through APNs configuration.
Create a private key
-
In the Apple developer portal, navigate to Keys.
-
To create a key, select +.
-
Provide a Key Name.
-
Select the Apple Push Notification service (APNs) checkbox.
-
Select Continue.
-
Review the configuration and select Register.
-
Download the
.p8
private key. It is used in the next exercise when you configure your Journey Optimizer push credential. -
Make note of the Key ID. It is used in the next exercise when you configure your Journey Optimizer push credential.
-
Make note of the Team ID. It is used in the next exercise when you configure your Journey Optimizer push credential.
Additional documentation can be found here.
Add your app push credentials in Journey Optimizer
Next you need to add your mobile application push credentials in Journey Optimizer. (In earlier versions of the product, these were added as part of the “App Surface” configuration in Data Collection).
The mobile app push credential registration is required to authorize Adobe to send push notifications on your behalf. Refer to the steps detailed below:
-
In the Journey Optimizer interface, open the Channels > Push settings > Push credentials menu.
-
Select Create push credential.
-
From the Platform drop-down, select the iOS operating system.
-
Enter the mobile app Bundle Id in the App ID (iOS Bundle ID) field. For example, com.adobe.luma.tutorial.swiftui
-
Enable the Apply to all sandboxes option to make these Push credentials available across all sandboxes. If a specific sandbox has its own credentials for the same Platform and App ID pair, those sandbox-specific credentials will take precedence.
-
Drag and drop your .p8 Apple Push Notification Authentication Key file obtained from the previous exercise.
-
Provide the Key ID, a 10-character string assigned during the creation of
p8
auth key. It can be found under the Keys tab in the Certificates, Identifiers and Profiles page of the Apple Developer portal pages. (You should have noted during the previous exercise.) -
Provide the Team ID. The Team ID is a value which can be found under the Membership tab or at the top of the Apple Developer portal page. (You should have noted during the previous exercise.)
-
Click Submit to create your push credential configuration.
Create a channel configuration for push in Journey Optimizer
Once you have created a push credential configuration, you must create a configuration to be able to send push notifications from Journey Optimizer.
-
In the Journey Optimizer interface open the Channels > General settings > Channel configurations menu and then select Create channel configuration.
-
Enter a name and a description (optional) for the configuration.
NOTE
Names must begin with a letter (A-Z). It can only contain alpha-numeric characters. You can also use underscore_
, dot.
and hyphen-
characters. -
To assign custom or core data usage labels to the configuration, you can select Manage access. Learn more about Object Level Access Control (OLAC).
-
Select the Push channel.
-
Select Marketing action(s) to associate consent policies to the messages using this configuration. All consent policies associated with the marketing action are leveraged in order to respect the preferences of your customers. Learn more about marketing actions.
-
Choose your Platform.
-
Select the same App id as for your push credential configured above.
-
Select Submit to save your changes.
Update datastream configuration
To ensure data send from your mobile app to the Edge Network is forwarded to Journey Optimizer, update your Experience Edge configuration .
-
In the Data Collection UI, select Datastreams, and select your datastream, for example Luma Mobile App.
-
Select
-
In the Datastreams >
-
If not already selected, select AJO Push Profile Dataset from Profile Dataset. This profile dataset is required when using the
MobileCore.setPushIdentifier
API call (see Register device token for push notifications) which ensures the unique identifier for push notifications (a.k.a. push identifier) is stored as part of the profile of the user. -
Adobe Journey Optimizer is selected. See Adobe Experience Platform settings for more information.
-
To save your datastream configuration, select Save.
-
Install Journey Optimizer tags extension
For your app to work with Journey Optimizer, you must update your tag property.
-
Navigate to Tags > Extensions > Catalog,
-
Open your property, for example Luma Mobile App Tutorial.
-
Select Catalog.
-
Search for the Adobe Journey Optimizer extension.
-
Install the extension.
-
In the Install Extension dialog
- Select an environment, for example Development.
- Select the AJO Push Tracking Experience Event Dataset dataset from the Event Dataset list.
- Select Save to Library and Build.
Validate setup with Assurance
-
Review the setup instructions section to connect your simulator or device to Assurance.
-
In the Assurance UI, select Configure.
-
Select
-
Select Save.
-
Select Push Debug from the left navigation.
-
Select the Validate Setup tab.
-
Select your device from the Client list.
-
Confirm that you aren’t getting any errors.
-
Select the Send Test Push tab.
-
(optional) Change the default details for Title and Body
-
Select
-
Check the Test Results.
-
You should see the test push notification appear in your app.
Signing
Signing the Luma app is needed to send push notifications and requires a paid Apple developer account.
To update the signing for your app:
-
Go to your app in Xcode.
-
Select Luma in the Project navigator.
-
Select the Luma target.
-
Select the Signing & Capabilities tab.
-
Configure Automatic manage signing, Team, and Bundle Identifier, or use your specific Apple development provisioning details.
IMPORTANT
Ensure you use a unique bundle identifier and replace thecom.adobe.luma.tutorial.swiftui
bundle identifier, as each bundle identifier must be unique. Typically, you use a reverse-DNS format for bundle ID strings, likecom.organization.brand.uniqueidentifier
. The Finished version of this tutorial, for example, usescom.adobe.luma.tutorial.swiftui
.