MoEngageBadgeHandler
@available(tvOS, unavailable)
public enum MoEngageBadgeHandler
Owns all badge-count logic for the MoEngage SDK. : nodoc:
-
Whether the SDK should manage badge counts. Reads
MoEngageBadgeUpdateEnabledfrom the main app’s Info.plist; defaults totrue.Declaration
Swift
public static var isBadgeUpdateEnabled: Bool { get }
-
Sets the app icon badge to the count of MoEngage badge-eligible notifications currently in the Notification Center. No-op when
MoEngageBadgeUpdateEnabledisfalse.Call on: app launch, app foreground, any notification interaction.
Declaration
Swift
public static func updateBadgeInMainApp()
-
Returns the badge value to stamp on an incoming notification’s content, for use in a Notification Service Extension.
Declaration
Swift
public static func badgeForIncomingNotification( deliveredNotifications: [UNNotification] ) -> NSNumberParameters
deliveredNotificationsThe already-delivered notifications obtained from
UNUserNotificationCenter.getDeliveredNotifications.Return Value
The new badge count (
delivered eligible + 1)