react-native-notify-kit 9.1.19 → 9.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,7 +18,7 @@ This repository preserves the original Notifee APIs and native core while contin
18
18
 
19
19
  ## Why this fork
20
20
 
21
- The original [Notifee](https://github.com/invertase/notifee) has not received updates since December 2024 (v9.1.8), with no bug fixes, no New Architecture support, and several critical issues left unresolved. In [issue #1254](https://github.com/invertase/notifee/issues/1254), the Invertase maintainer recommended migrating to `expo-notifications`.
21
+ The original [Notifee](https://github.com/invertase/notifee) repository was **officially archived** by Invertase on April 7, 2026 (last release: v9.1.8, December 2024). The archived README recommends this fork (`react-native-notify-kit`) as a community-maintained drop-in replacement, alongside `expo-notifications`. Previously, in [issue #1254](https://github.com/invertase/notifee/issues/1254), the Invertase maintainer had already suggested migrating to `expo-notifications`.
22
22
 
23
23
  However, `expo-notifications` does not cover several advanced capabilities that many production apps rely on:
24
24
 
@@ -34,6 +34,7 @@ This fork fills the gap: it preserves all of Notifee's advanced features, migrat
34
34
 
35
35
  <a href="https://github.com/marcocrupi/react-native-notify-kit/commits"><img src="https://img.shields.io/github/last-commit/marcocrupi/react-native-notify-kit.svg" alt="Last commit"></a>
36
36
 
37
+ - Officially recommended by Invertase as the community-maintained fork (April 2026)
37
38
  - Maintained fork of Notifee — actively developed and published as `react-native-notify-kit`
38
39
  - New Architecture only (TurboModules)
39
40
  - Minimum supported React Native: `0.73`
@@ -251,7 +252,7 @@ This fork is a complete migration to React Native's **New Architecture**:
251
252
  - **Minimum React Native 0.73**, development target **0.84**
252
253
  - **Toolchain**: Yarn 4, Node 22+, Java 17, compileSdk/targetSdk 35
253
254
  - **Core notification logic (NotifeeCore) is unchanged** — the public API is fully compatible with the original Notifee
254
- - **14 upstream bugs fixed** — see [Bugs Fixed from Upstream Notifee](#bugs-fixed-from-upstream-notifee) below
255
+ - **17 upstream bugs fixed** — see [Bugs Fixed from Upstream Notifee](#bugs-fixed-from-upstream-notifee) below
255
256
  - **Reliable trigger notifications** — AlarmManager is the default backend instead of WorkManager, with automatic fallback when exact alarm permission is not granted
256
257
  - **New API: `setNotificationConfig()`** — opt-out flag to prevent Notifee from intercepting iOS remote notification handlers (see [New APIs](#new-apis) below)
257
258
 
@@ -265,6 +266,8 @@ This fork fixes the following bugs that were never resolved in the original Noti
265
266
  | `completionHandler` not called on notification dismiss | iOS | Pre-existing | 9.1.12 |
266
267
  | `completionHandler` not called in `willPresentNotification` fallback | iOS | Pre-existing | 9.1.12 |
267
268
  | `getInitialNotification()` returns `null` on cold start (deprecated `UIApplicationLaunchOptionsLocalNotificationKey` check) | iOS | [#1128](https://github.com/invertase/notifee/issues/1128) | 9.1.12 |
269
+ | `willPresentNotification:` fallback silently drops foreground notifications when no original delegate is captured (returns `None` instead of platform defaults) | iOS | Pre-existing (introduced by partial fix in v9.1.12) | 9.1.20 |
270
+ | All delivered notifications dismissed from Notification Center when the app is opened | iOS | [#828](https://github.com/invertase/notifee/issues/828) | 9.1.20 |
268
271
  | `getInitialNotification()` returns `null` without `pressAction` configured | Android | [#1128](https://github.com/invertase/notifee/issues/1128) | 9.1.12 |
269
272
  | Foreground press events silently dropped when React instance not ready | Android | [#1279](https://github.com/invertase/notifee/issues/1279) | 9.1.12 |
270
273
  | Trigger notifications not firing on Android 14-15 when app is killed (missing `goAsync()` in `BroadcastReceiver`) | Android | [#1100](https://github.com/invertase/notifee/issues/1100) | 9.1.12 |
@@ -275,6 +278,8 @@ This fork fixes the following bugs that were never resolved in the original Noti
275
278
  | Manifest merger failure when overriding `foregroundServiceType` on `ForegroundService` | Android | [#1108](https://github.com/invertase/notifee/issues/1108) | 9.1.13 |
276
279
  | Foreground service notifications dismissible on Android 13+ even with `ongoing: true` (library doesn't auto-set `ongoing` for foreground services) | Android | [#1248](https://github.com/invertase/notifee/issues/1248) | 9.1.14 |
277
280
  | DST (daylight saving time) shifts repeating scheduled notifications by ±1 hour | Android | [#875](https://github.com/invertase/notifee/issues/875) | 9.1.14 |
281
+ | `!=` reference equality on String comparison in `NotificationPendingIntent` (latent — would activate when `getLaunchActivity()` returns a non-null value for `id=default`) | Android | Pre-existing (latent) | 9.1.19 |
282
+ | `pressAction.launchActivity` not defaulted at native layer when `pressAction.id === 'default'` | Android | N/A (defense-in-depth) | 9.1.19 |
278
283
 
279
284
  > **Note for apps requiring guaranteed exact alarms (alarm clocks, timers, calendars):**
280
285
  > Add `<uses-permission android:name="android.permission.USE_EXACT_ALARM" />` to your app's
@@ -285,6 +290,24 @@ This fork fixes the following bugs that were never resolved in the original Noti
285
290
 
286
291
  As bugs are fixed, this table is updated. See [CHANGELOG.md](CHANGELOG.md) for full details.
287
292
 
293
+ ## Behavior changes from upstream
294
+
295
+ In addition to bug fixes, the fork makes a few opinionated default changes vs `@notifee/react-native` to improve reliability and reduce footguns. These are intentional behavioral differences that you should be aware of when migrating:
296
+
297
+ - **Trigger notifications use AlarmManager by default** instead of WorkManager (since 9.1.12). WorkManager is battery-friendly but unreliable for time-sensitive notifications — Android may defer or drop WorkManager tasks based on Doze mode and OEM power management. Opt out per-trigger with `alarmManager: false` in the trigger config if you need battery-friendly scheduling where exact timing is not critical.
298
+
299
+ - **`AlarmType` defaults to `SET_EXACT_AND_ALLOW_WHILE_IDLE`** (since 9.1.12) instead of upstream's `SET_EXACT`, for better Doze mode compatibility.
300
+
301
+ - **`ongoing` defaults to `true` when `asForegroundService: true`** (since 9.1.14), preventing foreground service notifications from being dismissed by the user on Android 13+. This matches pre-Android 13 platform behavior. Override by setting `ongoing: false` explicitly.
302
+
303
+ - **Foreground service notifications dismissed on Android 14+ are auto re-posted** (since 9.1.14) while the service is still running. Android 14 ignores `FLAG_ONGOING_EVENT` for most foreground service types (except `mediaPlayback`, `phoneCall`, and enterprise DPC); the library detects the dismissal and immediately re-displays the notification.
304
+
305
+ - **`pressAction.launchActivity` defaults to `'default'` at the native layer when `pressAction.id === 'default'`** (since 9.1.19). The TypeScript validator already applied this default since upstream PR #141 (Sept 2020), but native code paths bypassing the validator (e.g., trigger notifications restored from the Room database after reboot, headless tasks) could miss it. The fork closes the gap at the native layer as defense-in-depth — eliminates an entire class of "tap doesn't open app" bugs in Android task management edge cases.
306
+
307
+ - **Library no longer hardcodes `foregroundServiceType` in its manifest** (since 9.1.13 — **BREAKING vs upstream**). Apps using `asForegroundService: true` on Android 14+ must declare their own `foregroundServiceType` on `app.notifee.core.ForegroundService` in their app manifest. See [Foreground Service Setup](#foreground-service-setup-android-14) below for migration instructions. Upstream hardcoded `shortService`, which caused a manifest merger failure ([#1108](https://github.com/invertase/notifee/issues/1108)) and a 3-minute timeout ANR crash ([#703](https://github.com/invertase/notifee/issues/703)).
308
+
309
+ These changes are documented in the [CHANGELOG](CHANGELOG.md) under the release that introduced them. If you rely on any of the upstream defaults, you can either pin to the specific behavior via the opt-out flags listed above, or open an issue to discuss.
310
+
288
311
  ## Foreground Service Setup (Android 14+)
289
312
 
290
313
  Android 14 (API 34) requires all foreground services to declare an explicit `foregroundServiceType`. If you use `asForegroundService: true` in your notifications, add the following to your app's `AndroidManifest.xml`:
@@ -8,6 +8,6 @@
8
8
  <versions>
9
9
  <version>202108261754</version>
10
10
  </versions>
11
- <lastUpdated>20260407095025</lastUpdated>
11
+ <lastUpdated>20260407165108</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 4cd00d35eb2c52b5da70bd750ca2f278
1
+ 523426f863dc23250d0c1a743fb96b31
@@ -1 +1 @@
1
- b2423a4923cfd7d1606dd2b1261c1c469852c77a
1
+ a2d62626c243cf75d31c355f4d49e273ce8ef511
@@ -1 +1 @@
1
- f7d8da04a8e3efd70f19ddeacdc092398c3b3af14737fd90e1f6e0fd76e6974c
1
+ 77dc38d52afd9711760ea1cdad9009496dd3f8eb9187bce7eb07c0e0b6647f80
@@ -1 +1 @@
1
- 7eca8612035b483c4dede070ada94ff63f5d04714c37597ddcba8e11afa8ad47e4107f6f1908503682c990b01954bede58b413f04f19e6c9896e6939703c6878
1
+ 17ce45722d24eb4fb5514a182980771c671b468f4173186b2c765fb259e4a9f0ef6c41e92732b7b4ee48ce736bff59918ff9b02bf8795e855d30c93d0cd474c5
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "9.1.19";
1
+ export declare const version = "9.1.21";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '9.1.19';
2
+ export const version = '9.1.21';
3
3
  //# sourceMappingURL=version.js.map
@@ -166,7 +166,23 @@ struct {
166
166
  willPresentNotification:notification
167
167
  withCompletionHandler:completionHandler];
168
168
  } else {
169
- completionHandler(UNNotificationPresentationOptionNone);
169
+ // No original delegate captured and the notification is not Notifee-owned.
170
+ // Returning UNNotificationPresentationOptionNone would silently drop the
171
+ // notification (no banner, no sound, no badge, no Notification Center entry),
172
+ // making remote pushes invisible to users in apps that don't install a
173
+ // competing UNUserNotificationCenterDelegate (e.g. apps without
174
+ // @react-native-firebase/messaging). Fall back to the platform default
175
+ // presentation options instead so the system shows the notification as it
176
+ // would if Notifee had not installed a delegate at all.
177
+ if (@available(iOS 14.0, *)) {
178
+ completionHandler(
179
+ UNNotificationPresentationOptionBanner | UNNotificationPresentationOptionSound |
180
+ UNNotificationPresentationOptionList | UNNotificationPresentationOptionBadge);
181
+ } else {
182
+ completionHandler(UNNotificationPresentationOptionAlert |
183
+ UNNotificationPresentationOptionSound |
184
+ UNNotificationPresentationOptionBadge);
185
+ }
170
186
  }
171
187
  }
172
188
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-notify-kit",
3
- "version": "9.1.19",
3
+ "version": "9.1.21",
4
4
  "author": "Marco Crupi",
5
5
  "description": "Maintained Notifee-compatible fork for React Native — advanced local notifications for Android & iOS.",
6
6
  "main": "dist/index.js",
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '9.1.19';
2
+ export const version = '9.1.21';