Skip to main content
The iOS app handles push notifications via APNs with rich notification support and deep link routing.

Architecture

Key files

PushManager

File: Utils/Push/PushManager.swift
Responsibilities:
  • Device token registration
  • Notification permission handling
  • Push payload parsing
  • Route extraction
  • Pending route management

Push routes

Routes map notification targets to in-app destinations:

Route parsing

Kind overrides

Some notification kinds have special routing:

Notification service extension

Target: DialedNotificationService Enriches notifications before display:

Communication style

For chat DMs, uses INSendMessageIntent:
This enables:
  • Sender avatar in notification
  • Communication notification style
  • Notification grouping

Attachment style

For media notifications:
  • Downloads image/avatar JPEGs
  • Attaches to notification
  • Shows rich preview

Token registration

Handling flow

  1. Notification received (background or foreground)
  2. Service extension enriches if applicable
  3. User taps notification
  4. PushManager extracts route from payload
  5. Sets pendingRoute published property
  6. Shell view observes and navigates

Notification kinds

Common notification kinds and their handling:

Testing push

Use Xcode’s push notification simulator:
  1. Create .apns file with payload
  2. Drag onto simulator
  3. Or use xcrun simctl push command

Troubleshooting