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

TIP
If you have set up your environment already as part of the Journey Optimizer in-app messaging lesson, you might already have performed some of the steps in this setup section.

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

  1. In the Apple developer portal, navigate to Keys.

  2. To create a key, select +.
    create new key

  3. Provide a Key Name.

  4. Select the Apple Push Notification service (APNs) checkbox.

  5. Select Continue.
    configure new key

  6. Review the configuration and select Register.

  7. Download the .p8 private key. It is used in the next exercise when you configure your Journey Optimizer push credential.

  8. Make note of the Key ID. It is used in the next exercise when you configure your Journey Optimizer push credential.

  9. Make note of the Team ID. It is used in the next exercise when you configure your Journey Optimizer push credential.
    Key Details

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:

  1. In the Journey Optimizer interface, open the Channels > Push settings > Push credentials menu.

  2. Select Create push credential.

    Create a new push credential configuration in Journey Optimizer

  3. From the Platform drop-down, select the iOS operating system.

  4. Enter the mobile app Bundle Id in the App ID (iOS Bundle ID) field. For example, com.adobe.luma.tutorial.swiftui

  5. 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.

  6. Drag and drop your .p8 Apple Push Notification Authentication Key file obtained from the previous exercise.

  7. 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.)

  8. 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.)

    Push credential configuration in Journey Optimizer

  9. 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.

  1. In the Journey Optimizer interface open the Channels > General settings > Channel configurations menu and then select Create channel configuration.

    Create a new channel configuration

  2. 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.
  3. To assign custom or core data usage labels to the configuration, you can select Manage access. Learn more about Object Level Access Control (OLAC).

  4. Select the Push channel.

  5. 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.

  6. Choose your Platform.

  7. Select the same App id as for your push credential configured above.

  8. Select Submit to save your changes.

    Push channel configuration

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 .

  1. In the Data Collection UI, select Datastreams, and select your datastream, for example Luma Mobile App.

  2. Select More for Experience Platform and select Edit Edit from the context menu.

  3. In the Datastreams > Folder > Adobe Experience Platform screen:

    1. 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.

    2. Adobe Journey Optimizer is selected. See Adobe Experience Platform settings for more information.

    3. To save your datastream configuration, select Save.

    AEP datastream configuration

Install Journey Optimizer tags extension

For your app to work with Journey Optimizer, you must update your tag property.

  1. Navigate to Tags > Extensions > Catalog,

  2. Open your property, for example Luma Mobile App Tutorial.

  3. Select Catalog.

  4. Search for the Adobe Journey Optimizer extension.

  5. Install the extension.

  6. In the Install Extension dialog

    1. Select an environment, for example Development.
    2. Select the AJO Push Tracking Experience Event Dataset dataset from the Event Dataset list.
    3. Select Save to Library and Build.
      AJO extension settings
NOTE
If you don’t see AJO Push Tracking Experience Event Dataset as an option, contact customer care.

Validate setup with Assurance

  1. Review the setup instructions section to connect your simulator or device to Assurance.

  2. In the Assurance UI, select Configure.
    configure click

  3. Select Plus next to Push Debug.

  4. Select Save.
    save

  5. Select Push Debug from the left navigation.

  6. Select the Validate Setup tab.

  7. Select your device from the Client list.

  8. Confirm that you aren’t getting any errors.
    validate

  9. Select the Send Test Push tab.

  10. (optional) Change the default details for Title and Body

  11. Select Bug Send Test Push Notification.

  12. Check the Test Results.

  13. 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:

  1. Go to your app in Xcode.

  2. Select Luma in the Project navigator.

  3. Select the Luma target.

  4. Select the Signing & Capabilities tab.

  5. 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 the com.adobe.luma.tutorial.swiftui bundle identifier, as each bundle identifier must be unique. Typically, you use a reverse-DNS format for bundle ID strings, like com.organization.brand.uniqueidentifier. The Finished version of this tutorial, for example, uses com.adobe.luma.tutorial.swiftui.

    Xcode signing capabilities