Configure Marketing Cloud Engagement
Runtime Toggles
Set the Event Delegate
Track View States
Prevent or Delay Display
Customize Fonts
Configure Push Permission Authorization
Event Tracking
Handle URLs
Data Protection and Privacy
Changelog
Push Primers are a type of in-app message that educates users about the benefits of push notifications before requesting system-level permission. When a user taps the permission button in a Push Primer, the SDK triggers the standard iOS notification authorization request.
Use this configuration to control which specific push notification permissions are requested when the user interacts with a Push Primer. For example, you can request only alerts and sounds while excluding badges, or customize the combination based on your app’s needs.
To customize which permissions are requested, such as alerts, sounds, or badges, use the setNotificationAuthorizationOptions method during SDK initialization. If you don’t explicitly configure these options, the SDK requests permissions for alerts, sounds, and badges by default.
This code example shows how to configure push permission authorization to request only alerts and sounds.
1func configureSdk() -> Bool {
2 ...
3
4 // Configure In-App Messaging Feature with custom authorization options
5 let iamFeatureConfiguration = InAppMessagingFeatureConfigBuilder()
6 .setEventDelegate(self)
7 .setURLHandlingDelegate(self)
8 .setInAppMessageFont(name: "HelveticaNeue")
9 .setNotificationAuthorizationOptions([.alert, .sound])
10 .build()
11 configBuilder = configBuilder
12 .setInAppMessagingFeature(config: iamFeatureConfiguration)
13
14 ...
15}