The AcousticMobilePushNotification.xcframework enables support for media attachments (images, audio, and video) and also enables support for Acoustic dynamic action categories. This second framework integration requires independent/additional app provisioning with support for push notifications.
A notification extension essentially functions as a second app within your overall app bundle. You must generate provisioning for the notification extension. A typical pattern for the bundle id is com.company.app.notification if your app bundle id is com.company.app.
- Set a Target in your XCode project. In your XCode project, go to the File menu and select New > Target. A dialog box opens.
- In the dialog box, select iOS at the top and Notification Service Extension in the center of the window. The new target is added to the XCode project.
- Add the framework to the notification service target. Drag
AcousticMobilePushNotification.xcframeworkfrom the SDK folder into the project's frameworks (the Embed Frameworks Build Phase of the containing iOS application).
If you see the errors below, it means the AcousticMobilePushNotification.xcframework is included in the Notification Service Extension. Remove it (typically from the General tab of the Notification Service Extension target).
- ERROR ITMS-90205: "Invalid Bundle. The bundle at 'Name.appex' contains disallowed nested bundles."
- ERROR ITMS-90206: "Invalid Bundle. The bundle at 'Name.appex' contains disallowed file 'Frameworks'."
- Remove methods in the
UNNotificationServiceExtensionsubclass and change the superclass to the provided
- Add the MceConfig.json file to the Notification Service target. Open the MceConfig.json file and check the notification service target membership in the Target Membership of the File Inspector in the Xcode pane.
- Add -ObjC to the Other Linker Flags build options for the Notification Service.
- Add App Group capability to your notification service extension target. Be sure to use the same app group as the main application.
- Add the Keychain Sharing capability to your notification service extension target. Be sure to use the same value as the main application.
To add media attachments to notifications, you must configure the mutable-content flag and media-attachment key in the iOS 10 payload.
To add media attachments to notifications, you must configure the
mutable-content flag and
media-attachment key in the iOS 10 payload. For more information, refer to the following articles:
Updated over 1 year ago