Skip to content

10.8.0

Choose a tag to compare

@marcocrupi marcocrupi released this 29 Sep 11:20
· 33 commits to main since this release
Immutable release. Only release title and notes can be modified.

Added

  • FCM Mode: added top-level subtitle support and Android circularLargeIcon support in the Server SDK wire payload and client reconstruction.
  • FCM Mode / Android: expanded the supported BIG_TEXT style with title and summary, and BIG_PICTURE with title, summary, and largeIcon (including explicit null to hide the expanded large icon). Other notification fields and styles remain outside the FCM Mode contract.
  • FCM Mode / Android interactions: added explicit body-tap opt-out with pressAction: null; body and action press actions now carry mainComponent and launchActivityFlags alongside id and launchActivity. Actions also carry icon and the supported AndroidInput configuration; input: true requests a standard direct reply. The _v: 1 wire contract is unchanged.

Fixed

  • Android / foreground services: stopForegroundService() no longer cold-starts a ForegroundService just to deliver STOP when no instance is active. Repeated STOP calls are safe and idempotent; stopping a service that is neither active nor starting is a no-op. On Android 12+ (API 31+), a platform ForegroundServiceStartNotAllowedException in the defensive terminal STOP/null path is now non-fatal instead of being wrapped in a fatal error. This terminal denial handling does not suppress real START failures, unrelated errors, or configuration failures. Issue #77.
  • iOS / per-notification badges: NotificationIOS.badgeCount now rejects fractional and non-finite values. Valid numeric values must be finite non-negative integers; negative values remain invalid. For immediate and trigger notifications, an absent or null badgeCount leaves the current badge unchanged, 0 still clears it, and positive integers still set it.
  • FCM Mode / notification identity: preserved public notification.id in the unchanged _v: 1 payload and client reconstruction. Android display/replacement, readback, events, and cancel now use that ID instead of the Firebase messageId when it is supplied; buildFcmNotification() retains it.
  • FCM Mode / iOS identity: the NSE keeps the logical NotifyKit notification ID separate from the physical APNs request identifier. Readback, events, and cancel use the logical ID, including cancellation of multiple delivered requests associated with it. Payloads without an ID keep their path-specific legacy fallback.
  • FCM Mode / APNs: validated the effective apns-collapse-id (options.collapseKey ?? notification.id) against the 64-byte UTF-8 limit. Transport collapse remains independent of public notification identity and does not guarantee replacement after delivery.
  • FCM Mode / iOS: the Notification Service Extension now preserves Server SDK notification.data in the delivered notification and event data while keeping APNs/FCM/NotifyKit metadata authoritative and legacy options.data behavior intact.
  • FCM Mode / iOS: the extension preserves positive and zero aps.badge values and leaves an absent badge absent. Legacy/manual _v: 1 notifee_options.ios.badgeCount: null is now treated as an absent override instead of being passed to the native badge setter as NSNull, preserving the original APNs badge behavior. Numeric legacy overrides keep precedence over aps.badge; the public Server SDK options.iosBadgeCount?: number still rejects null.
  • FCM Mode / Android interactions: legacy _v: 1 input: false now means no reply; other malformed legacy inputs are rejected instead of silently dropped. The internal body-tap opt-out ID is rejected as a public or wire pressAction.id.
  • FCM Mode / Android interactions: malformed body and action pressAction values are rejected instead of treating a malformed body value as absent. Present non-array actions and malformed action entries are rejected, and every launchActivityFlags value is validated.

Tests

  • Android / foreground services: expanded lifecycle and race regression coverage for inactive/repeated STOP, START/STOP/new START, pending START/STOP ordering, and late runner completion, while retaining regression checks for defensive SecurityException handling (#44) and same-ID notification updates (#75).
  • Android / foreground-service runtime: inactive/double STOP, START/STOP/new START, pending START ordering, and same-ID update/re-post/restart paths passed on Android 10/API 29 and Android 13/API 33 emulators and a physical Pixel 9 Pro XL running Android 17/API 37. The #77 background STOP scenario passed on API 33 and API 37; the #44 defensive SecurityException regression passed on API 37. Runtime qualification used native entrypoints equivalent to the library's Android bridge calls; the literal JavaScript/headless end-to-end path was not run.
  • iOS / per-notification badges: expanded validator, display, and timestamp/rolling trigger regression coverage for absent, null, zero, positive finite integers, and invalid numeric rejection before native dispatch. Physical iPhone 16e / iOS 26.5 checks passed for immediate absent/null/0/positive and real timestamp trigger null/0/positive. Negative, fractional, NaN, and ±Infinity inputs were qualified host-side only and were not sent to the device; rolling trigger device runtime was not run.
  • FCM Mode / iOS badges: added production NSE helper and badge-builder coverage for absent/legacy null overrides and numeric precedence. On the same physical iPhone, the real APNs transport gate (T0) passed and B1–B8 passed 8/8 with the installed NSE: legacy null or absent with APNs absent/0/7, and legacy 3/0 overriding APNs 7. Badge-zero withdrawal was classified as iOS/SpringBoard behavior.
  • FCM Mode / Batch 3: added Server SDK, client reconstruction, Android native, and iOS NSE/readback/cancel/event harness regression coverage for notification identity, distinct collapse keys, legacy _v: 1 fallbacks, and the effective APNs 64-byte UTF-8 limit.
  • FCM Mode / Batch 3 Android device: on a Pixel 9 Pro XL / Android 17 API 37, qualified same-N replacement with distinct M and C values, preservation of distinct N values sharing C when both arrived, readback/cancel and PRESS by N, buildFcmNotification() identity, and the legacy no-N fallback.
  • FCM Mode / Batch 3 iOS device: on an iPhone 16e / iOS 26.5, qualified N=C and N≠C through the real NSE, foreground identity, readback and PRESS by N, cancellation of multiple R values sharing N, collision safety, and the legacy no-N fallback to R. iOS ACTION_PRESS device runtime was not run.
  • FCM Mode / transport collapse: an offline iOS device received only the second message after reconnection when both shared C. In a separate run, the NSE processed a second N=C push while Notification Center still showed the first push's content, confirming that transport collapse does not guarantee replacement after delivery.
  • FCM Mode / Batch 2A: added Server SDK serialization and validation, client reconstruction, and Firebase Admin compatibility coverage, including _v: 1, omitted fields, explicit circularLargeIcon: false, and BIG_PICTURE.largeIcon: null.
  • FCM Mode / Android: qualified Batch 2A display on a physical Pixel 9 Pro XL running Android 17/API 37, including subtitle, both circular icon settings, the absent default, both expanded styles, explicit BIG_PICTURE.largeIcon: null, and a legacy payload without the new fields. iOS subtitle device runtime was not run.
  • FCM Mode / Batch 2B: added Server SDK serialization/validation, client reconstruction, normal-validator, and Firebase Admin compatibility coverage for Android interactions. Physical Pixel 9 Pro XL / Android 17/API 37 checks passed for default body tap, pressAction: null (contentIntent=null, no app opening or PRESS), configured press actions with launch flags, ACTION_PRESS without input, and direct replies (input: true and configured choices). Action icon passed the data/native path, but was not visibly rendered in the shade; an alternate mainComponent was not run on device.
  • FCM Mode / Android interactions: added host regression coverage across wire serialization, reconstruction, and normal validation for malformed interaction payloads; invalid payloads do not invoke the native display module.
  • FCM Mode / iOS: replaced the synthetic NSE stand-in with shared Server SDK-to-NSE fixtures and a native harness that exercises the production extension helper.

📦 npm: https://www.npmjs.com/package/react-native-notify-kit/v/10.8.0