Enable App Groups for the iOS Extension SDK for Marketing Cloud Next

The main app, Service Extension, and Content Extension run in separate processes. iOS limits communication between extensions and the main app, so the SDK uses the App Groups capability to share data between them.

Configure App Groups for the Main App Target 

  1. In your main app target, on the Signing & Capabilities tab, add the App Groups capability.

  2. Add an app group container or use an existing one. If you create a container, use a name in this format:

    group.<bundle-id>.sfmarketingcloudsdk

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

    • Info.plist key name: SF_MARKETINGCLOUD_APP_GROUP_KEY
    • Info.plist value type: String
    • Info.plist value: The app group container name, such as group.com.salesforce.MyAwesomeApp.sfmarketingcloudsdk.

Configure App Groups for the Extension Targets 

Repeat the preceding steps to add app groups for your Service Extension and Content Extension targets. Use the same container name and SF_MARKETINGCLOUD_APP_GROUP_KEY value in each extension’s Info.plist.

In the Info.plist file, the value of SF_MARKETINGCLOUD_APP_GROUP_KEY must be identical for the main app, the service extension, and the content extension.

Important

See Also