Summary
When a push notification arrives, the NSE already enriches the banner with the real message text (see PR #400). Add the ability to see a larger preview on long-press / pull-down — iOS's expanded notification interface — so the user can read more of the message without opening the app.
Background
The collapsed lock-screen banner shows only 2–4 lines of body text (Apple's documented figure). On long-press, iOS shows "the full notification interface." Today the gateway caps the preview body at MAX_BODY_CHARS = 178 (src/integrations/apns/preview.ts:33), so even the expanded view only ever shows that capped string.
"Initially, it displays an abbreviated banner with the title, subtitle, and two to four lines of body text from the notification. If the user presses the abbreviated banner, iOS displays the full notification interface, including any notification-related actions."
— Apple, Customizing the Appearance of Notifications
Options
Option A — longer body, default expanded view (small)
Raise/remove the MAX_BODY_CHARS cap so GET /api/push/preview returns more of the message. The collapsed banner still truncates to 2–4 lines; long-press reveals the rest via the system's default expanded layout.
- Pros: one constant change in
preview.ts; no new native target; the existing NSE already writes body.
- Cons: zero layout control (system font/spacing only); no images/branding. Apple guarantees "the full notification interface" on expand but publishes no hard maximum for the default expanded body, so an extremely long body isn't guaranteed to render in full (fine for normal message lengths).
Option B — UNNotificationContentExtension, custom expanded UI (larger)
A separate app-extension target with its own view controller for a fully custom expanded card — fonts, branding, images, styled/rich text, optional interactive controls.
- Coexists with the existing NSE: the NSE mutates content first, then the content extension renders the custom expanded UI, both keyed by the same
UNNotificationCategory id.
- Requires: a new Notification Content Extension target, a view controller, the
UNNotificationExtensionCategory + UNNotificationExtensionInitialContentSizeRatio Info.plist keys, category registration, and config-plugin wiring to generate the target during expo prebuild (mirroring the NSE plugin).
- Note:
UNNotificationAttachment renders media (image/gif/video) in the expanded view but not rich text; styled text needs the content extension.
Refs:
Recommendation
Start with Option A — it delivers "more text on long-press" for a one-constant change and covers the common case. Reach for Option B only when a designed card (images, formatting) is wanted; that's a meaningfully larger effort and its own PR.
Privacy note
Whichever path: the message text must continue to be fetched on-device by the NSE/content extension from GET /api/push/preview (never placed in the APNs wire payload), preserving the "Apple never sees the text" posture from PR #400.
Acceptance
- Long-pressing a Gini message notification shows more of the message than the collapsed banner.
- Message text still never transits Apple (fetched on-device).
- Collapsed banner behavior unchanged.
Summary
When a push notification arrives, the NSE already enriches the banner with the real message text (see PR #400). Add the ability to see a larger preview on long-press / pull-down — iOS's expanded notification interface — so the user can read more of the message without opening the app.
Background
The collapsed lock-screen banner shows only 2–4 lines of body text (Apple's documented figure). On long-press, iOS shows "the full notification interface." Today the gateway caps the preview body at
MAX_BODY_CHARS = 178(src/integrations/apns/preview.ts:33), so even the expanded view only ever shows that capped string.Options
Option A — longer body, default expanded view (small)
Raise/remove the
MAX_BODY_CHARScap soGET /api/push/previewreturns more of the message. The collapsed banner still truncates to 2–4 lines; long-press reveals the rest via the system's default expanded layout.preview.ts; no new native target; the existing NSE already writesbody.Option B — UNNotificationContentExtension, custom expanded UI (larger)
A separate app-extension target with its own view controller for a fully custom expanded card — fonts, branding, images, styled/rich text, optional interactive controls.
UNNotificationCategoryid.UNNotificationExtensionCategory+UNNotificationExtensionInitialContentSizeRatioInfo.plist keys, category registration, and config-plugin wiring to generate the target duringexpo prebuild(mirroring the NSE plugin).UNNotificationAttachmentrenders media (image/gif/video) in the expanded view but not rich text; styled text needs the content extension.Refs:
Recommendation
Start with Option A — it delivers "more text on long-press" for a one-constant change and covers the common case. Reach for Option B only when a designed card (images, formatting) is wanted; that's a meaningfully larger effort and its own PR.
Privacy note
Whichever path: the message text must continue to be fetched on-device by the NSE/content extension from
GET /api/push/preview(never placed in the APNs wire payload), preserving the "Apple never sees the text" posture from PR #400.Acceptance