User Activity

Notification Center

Overview

macOS Notification Center stores a history of delivered notifications in a SQLite database. Each notification record includes the delivering application, notification title, subtitle, body text, and delivery timestamp. Notifications from messaging apps, email clients, calendar alerts, and system events are all recorded, providing an independent timeline of application activity and user alerts.

Forensic Significance

Evidence TypeForensic Value
Notification contentMessage previews, email subjects, alert text
Delivering applicationWhich app generated the notification
Delivery timestampsWhen notifications were shown
App activity evidenceProof an application was running and generating events
Message previewsPartial message content even if the full message is deleted
Calendar alertsMeeting reminders correlating with Calendar data

File Locations

ArtifactPathFormat
Notification database~/Library/Group Containers/group.com.apple.usernoted/db2/dbSQLite
Notification preferences~/Library/Preferences/com.apple.ncprefs.plistPlist

Database Schema

record table

ColumnTypeDescription
rec_idINTEGERPrimary key
app_idINTEGERFK to app table
uuidBLOBNotification UUID
dataBLOBBinary plist containing notification content
delivered_dateREALDelivery timestamp (Core Data)
presentedINTEGERWhether notification was shown to user
styleINTEGERNotification style (banner, alert)
snooze_fire_dateREALSnoozed notification fire date

app table

ColumnTypeDescription
app_idINTEGERPrimary key
identifierTEXTApplication bundle identifier

Notification Data BLOB

The data column contains a binary plist with notification content:

KeyDescription
titl / titleNotification title
subt / subtitleNotification subtitle
bodyNotification body text
idenNotification identifier
cateNotification category
thrdThread identifier (for grouped notifications)

Key Fields for Analysis

Basic Notification History

SELECT
    a.identifier AS app,
    datetime(r.delivered_date + 978307200, 'unixepoch') AS delivered,
    r.presented
FROM record r
JOIN app a ON r.app_id = a.app_id
ORDER BY r.delivered_date DESC
LIMIT 50;

Extract Notification Content

The data blob requires binary plist parsing:

import sqlite3
import plistlib

conn = sqlite3.connect('db')
cursor = conn.execute("""
    SELECT a.identifier, r.delivered_date, r.data
    FROM record r JOIN app a ON r.app_id = a.app_id
    ORDER BY r.delivered_date DESC LIMIT 20
""")

for app, ts, data in cursor:
    try:
        plist = plistlib.loads(data)
        title = plist.get('titl', plist.get('title', ''))
        body = plist.get('body', '')
        print(f"{app}: {title} - {body}")
    except:
        pass

Timestamps

Notification Center uses Core Data timestamps (seconds since 2001-01-01 00:00:00 UTC).

Analysis Notes

  • Message previews: Notifications from Messages, WhatsApp, Slack, and other messaging apps often include message preview text. This content may persist in the notification database even after the original message is deleted.
  • Email subject lines: Mail.app notifications include email subjects and sender names, providing an email activity timeline independent of the Envelope Index.
  • Notification preferences: The com.apple.ncprefs.plist file reveals which apps the user has configured for notifications and their alert style, indicating which apps the user actively monitors.
  • Retention: Notification records are periodically pruned. The retention period varies by macOS version and notification volume.
  • Binary plist content: The notification data column requires binary plist parsing. Not all fields are present in every notification.
  • App identification: The identifier field in the app table maps to application bundle IDs, enabling identification of the source application.

Version Differences

macOS VersionChanges
10.8+Notification Center introduced
10.14 (Mojave)Enhanced notification grouping
12 (Monterey)Focus modes affect notification delivery
13 (Ventura)Database path changes

Tool Support

ToolSupport
macforNot yet implemented (planned)
sqlite3 + PythonManual database and plist extraction
mac_aptOpen-source notification parser

References

Previous
Location Services