Notification tray status management provides essential functionality for tracking whether users have seen their notifications. This enables accurate badge counts, notification indicators, and cross-device synchronization in your app.

Get Tray Status

Retrieve current seen status to show/hide notification badges

Mark as Seen

Update tray status when users view their notifications

Cross-Device Sync

Server-managed state ensures consistency across all user sessions

Real-time Updates

LiveObject observation provides immediate local updates

Key Features

Status Tracking

  • Global tray-level seen status - Track whether the entire notification tray has been viewed
  • Server-managed timestamps - Reliable lastTraySeenAt and lastTrayOccurredAt tracking
  • Cross-device consistency - Seen status synchronizes across all user devices

Real-time Updates

  • LiveObject observation - Immediate local updates when status changes
  • Optimal refresh strategy - Get updated status when returning to app
  • Smart polling - Optional background refresh strategies

Status Data Model

The notification tray status contains three key properties:
PropertyTypeDescription
isSeenBooleanWhether the tray has been seen since the last notification
lastTraySeenAtDatetimeTimestamp when the tray was last marked as seen
lastTrayOccurredAtDatetimeTimestamp when the most recent notification occurred

Core SDK Methods

token = client.notificationTray.getNotificationTraySeen().observe({ liveObject, error in
  
  guard let snapshot = liveObject.snapshot else { return }
  // Usage
  // snapshot.lastTraySeenAt
  // snapshot.lastTrayOccurredAt
  // snapshot.isSeen
})

Implementation Workflow

Refresh Strategies