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.
-
In your main app target, on the Signing & Capabilities tab, add the App Groups capability.
-
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 -
Add the container name to a new
Info.plistkey with these details:Info.plistkey name:SF_MARKETINGCLOUD_APP_GROUP_KEYInfo.plistvalue type: StringInfo.plistvalue: The app group container name, such asgroup.com.salesforce.MyAwesomeApp.sfmarketingcloudsdk.
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.