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.
Note: This tutorial assumes that you have already added a Notification Content extension. If you don't, jump straight to Integrating the Batch Extension SDK.
- Open your Xcode project and go your main Target settings.
- Open the
Signing & Capabilitiestab and click the
+ Capabilitybutton, in the new window, select
- Under the
App groupssection, click the
- Set 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.
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 extension
- Add your container name using the