App Groups
Starting with Batch SDK 1.16.0, groundwork has been layed to enable some future features that require that the extension and application are able to communicate.
We'll go through the process of setting App Groups up for your application.
Enabling App Groups capability
Open your Xcode project and go your main Target settings.
Open the
Signing & Capabilitiestab and click the+ Capabilitybutton, in the new window, selectApp Groups.

Under the
App groupssection, click the+buttonSet the new container to be
group.YOUR-BUNDLE-IDENTIFIER.batchwhere YOUR-BUNDLE-IDENTIFIER is the bundle identifier of your main target

Reproduce those steps with the target of your Notification Service Extension. Make sure the container's name of your extension is the same as set in your main target.

Use a pre-existing App Group
If you've already set up an App Group and don't want to make another one, you can ask Batch to use another App Group than the predefined one:
Open your
Info.plistof your main target AND extensionAdd your container name using the
BATCH_APP_GROUP_IDkey

Last updated

