CleanupMode

public enum CleanupMode : String, CaseIterable, Sendable

Cleanup mode determines how notifications are cleaned up.

  • No automatic cleanup.

    Notifications will accumulate indefinitely until manually removed. Use this mode if you want full control over notification lifecycle.

    Declaration

    Swift

    case none = "NONE"
  • Cleanup based on notification count.

    Removes oldest notifications when count exceeds maxStoredNotifications. This ensures storage doesn’t grow unbounded while keeping recent notifications.

    Declaration

    Swift

    case countBased = "COUNT_BASED"
  • Cleanup based on notification age.

    Removes notifications older than maxNotificationAgeDays. This ensures outdated notifications are automatically removed.

    Declaration

    Swift

    case ageBased = "AGE_BASED"
  • Hybrid cleanup using both count and age.

    Applies both count-based and age-based cleanup strategies. Notifications are removed if they exceed either the count limit or age limit.

    Declaration

    Swift

    case hybrid = "HYBRID"