# App Groups for push tracking

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

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

*   [Set up push notifications](/integrations/sdk/expo/push-notifications/push/) with `useRichPush: true` enabled
*   Created an App Group identifier in the [Apple Developer Portal](https://developer.apple.com/). The identifier must start with `group.`—for example, `group.com.example.myapp.cio`.

## Add the App Group ID to your plugin configuration[](#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

 Auto-initialization (Expo 53+)

#### Auto-initialization (Expo 53+)[](#Auto-initialization \(Expo 53+\))

```json
{
   "expo": {
      "plugins": [
         [
            "customerio-expo-plugin",
            {
               "config": {
                  "cdpApiKey": "<CDP_API_KEY>",
                  "region": "us"
               },
               "ios": {
                  "pushNotification": {
                     "useRichPush": true,
                     "appGroupId": "group.com.example.myapp.cio"
                  }
               }
            }
         ]
      ]
   }
}
```

 Manual initialization

#### Manual initialization[](#Manual initialization)

```json
{
   "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:

```bash
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.