Enable App Groups Capability

To ensure that push delivery events and the carousel template work as intended, add the App Groups capability to your app. This capability is required because the main app, the service extension, and the content extension are separate processes. For security and performance reasons, iOS limits interprocess communication between the extensions and the main app.

Configure App Groups for the Main App Target 

Set up your main app to use the App Groups feature. You can add the main app to a new group or an existing one.

  1. Select your main app target.

  2. On the Signing & Capabilities tab, add the App Groups capability.

  3. Add an app group container or select an existing one. If you create a container, use a name in this format to make it easy to identify later:

    group.<bundle-id>.sfmarketingcloudsdk

  4. Add the container name to a new Info.plist key with these details:

    • Key name: SF_MARKETINGCLOUD_APP_GROUP_KEY
    • Value type: String
    • Value: The app group container name, such as group.com.salesforce.MyAwesomeApp.sfmarketingcloudsdk

Configure App Groups for the Service and Content Extensions 

After you add an app group to the main app target, add the service and content extension targets to the same group.

  1. Select the service extension target.
  2. On the Signing & Capabilities tab, add the App Groups capability.
  3. Select the same app group name that you assigned in the main app target.
  4. Edit the Info.plist file for the extension to include the same SF_MARKETINGCLOUD_APP_GROUP_KEY value that you added in the Info.plist file for the main app.
  5. Repeat these steps for the content extension target.

The SF_MARKETINGCLOUD_APP_GROUP_KEY value must be identical in the Info.plist files for the main app, the service extension, and the content extension.

Important