RoverNotifications

The RoverNotifications module contains all the functionality for receiving, tracking, displaying and handling notifications. It also contains the NotificationCenter along with the deep link support for presenting it.


Assembler

Rover.initialize(assemblers: [
    //...
    NotificationsAssembler(appGroup: nil,
        isInfluenceTrackingEnabled: true,
        influenceTime: 120,
        maxNotifications: 200)
])

appGroup: String?

(Optional) A domain identifier used to share data between your app and a UNNotificationServiceExtension. This is required for the InfluenceTracker to be able to track influenced opens. The default value is nil which means if you don’t set this to the correct value influenced open tracking will not function.

Details on how to setup a UNNotificationServiceExtension and use the appGroup parameter can be found in the Push Notifications guide.

isInfluenceTrackingEnabled: Bool

(Optional) When isInfluenceTrackingEnabled is true the RoverNotifications module will automatically track influenced opens. This relies on the appGroup parameter being set properly as discussed above. The default value is true.

influenceTime: Int

(Optional) An app is considered influenced when it is opened within a short period of time after a notification is received. The influenceTime defines the period of time in seconds. If the app is opened after the influenceTime, an influenced open event is not tracked. The default value is 120 (two minutes).

maxNotifications: Int

(Optional) The maximum number of notifications to retain in the NotificationStore. Notifications are stored on disk so this value limits the amount of space fetched notifications can occupy. When the maximum number is reached, notifications are purged using a FIFO strategy. The default value is 200.


Services

The following services are defined in the RoverNotifications module and are registered by the NotificationsAssembler:

System Frameworks
  • UIKit
  • UserNotifications
Dependencies