App Groups for push tracking

Updated

App Groups are required for reliable push delivery tracking on iOS. Without this setup, delivery metrics may be lost if iOS terminates the Notification Service Extension before the tracking request completes. With App Groups, the SDK automatically recovers these lost metrics on the next app launch.

Before you begin

Before you configure App Groups, make sure you’ve completed the following:

Add the App Group ID to your plugin configuration

To enable App Groups, add appGroupId to the ios.pushNotification section of your customerio-expo-plugin configuration. The Expo plugin handles the rest—it automatically:

  • Adds the App Group capability to both your main app target and the Notification Service Extension
  • Configures the entitlements for both targets
  • Passes the App Group identifier to the SDK initialization
{
   "expo": {
      "plugins": [
         [
            "customerio-expo-plugin",
            {
               "config": {
                  "cdpApiKey": "<CDP_API_KEY>",
                  "region": "us"
               },
               "ios": {
                  "pushNotification": {
                     "useRichPush": true,
                     "appGroupId": "group.com.example.myapp.cio"
                  }
               }
            }
         ]
      ]
   }
}
{
   "expo": {
      "plugins": [
         [
            "customerio-expo-plugin",
            {
               "ios": {
                  "pushNotification": {
                     "useRichPush": true,
                     "appGroupId": "group.com.example.myapp.cio",
                     "env": {
                        "cdpApiKey": "<CDP_API_KEY>",
                        "region": "us"
                     }
                  }
               }
            }
         ]
      ]
   }
}

After updating your configuration, rebuild your app:

npx expo prebuild --clean

 appGroupId requires useRichPush

App Groups rely on the Notification Service Extension to track delivery metrics. You must set useRichPush: true for appGroupId to take effect.
Copied to clipboard!
  Contents
Version