@react-native-firebase/messaging 23.8.6 → 23.8.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [23.8.8](https://github.com/invertase/react-native-firebase/compare/v23.8.6...v23.8.8) (2026-03-12)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **messaging, expo:** retrieve expo-notification config if available, then deprecated notification ([#8663](https://github.com/invertase/react-native-firebase/issues/8663)) ([eb90301](https://github.com/invertase/react-native-firebase/commit/eb90301c49af807c4bd3eecadd9a67364c4a30a4))
11
+
12
+ ## [23.8.7](https://github.com/invertase/react-native-firebase/compare/v23.8.6...v23.8.7) (2026-03-12)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **messaging, expo:** retrieve expo-notification config if available, then deprecated notification ([#8663](https://github.com/invertase/react-native-firebase/issues/8663)) ([eb90301](https://github.com/invertase/react-native-firebase/commit/eb90301c49af807c4bd3eecadd9a67364c4a30a4))
17
+
6
18
  ## [23.8.6](https://github.com/invertase/react-native-firebase/compare/v23.8.5...v23.8.6) (2026-02-03)
7
19
 
8
20
  **Note:** Version bump only for package @react-native-firebase/messaging
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  // Generated by genversion.
4
- export const version = '23.8.6';
4
+ export const version = '23.8.8';
5
5
  //# sourceMappingURL=version.js.map
@@ -1,6 +1,6 @@
1
1
  import type { Messaging, Statics } from './types/messaging';
2
2
  import type { ReactNativeFirebase } from '@react-native-firebase/app';
3
- export declare const SDK_VERSION = "23.8.6";
3
+ export declare const SDK_VERSION = "23.8.8";
4
4
  type MessagingNamespace = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<Messaging, Statics> & {
5
5
  messaging: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<Messaging, Statics>;
6
6
  firebase: ReactNativeFirebase.Module;
@@ -1,2 +1,2 @@
1
- export declare const version = "23.8.6";
1
+ export declare const version = "23.8.8";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -64,8 +64,16 @@ RCT_EXPORT_MODULE();
64
64
  NSMutableDictionary *constants = [NSMutableDictionary new];
65
65
  constants[@"isAutoInitEnabled"] =
66
66
  @([RCTConvert BOOL:@([FIRMessaging messaging].autoInitEnabled)]);
67
+ #if TARGET_IPHONE_SIMULATOR
68
+ // `isRegisteredForRemoteNotifications` is flaky and hangs on the simulator sometimes
69
+ // It is reasonably safe to return a "NO" to avoid the simulator hang
70
+ // Reasoning: registering multiple times is not harmful so if an app relies on this
71
+ // constant, sees a "NO" and then re-register, that is fine.
72
+ constants[@"isRegisteredForRemoteNotifications"] = NO;
73
+ #else
67
74
  constants[@"isRegisteredForRemoteNotifications"] = @(
68
75
  [RCTConvert BOOL:@([[UIApplication sharedApplication] isRegisteredForRemoteNotifications])]);
76
+ #endif
69
77
  constants[@"isDeliveryMetricsExportToBigQueryEnabled"] =
70
78
  @([RCTConvert BOOL:@(_isDeliveryMetricsExportToBigQueryEnabled)]);
71
79
  return constants;
package/lib/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '23.8.6';
2
+ export const version = '23.8.8';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/messaging",
3
- "version": "23.8.6",
3
+ "version": "23.8.8",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "React Native Firebase - React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a cost free service, allowing for server-device and device-device communication. The React Native Firebase Messaging module provides a simple JavaScript API to interact with FCM.",
6
6
  "main": "./dist/module/index.js",
@@ -25,11 +25,11 @@
25
25
  "messaging"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@react-native-firebase/app": "23.8.6",
28
+ "@react-native-firebase/app": "23.8.8",
29
29
  "expo": ">=47.0.0"
30
30
  },
31
31
  "devDependencies": {
32
- "expo": "^54.0.27",
32
+ "expo": "^55.0.5",
33
33
  "react-native-builder-bob": "^0.40.17",
34
34
  "typescript": "^5.9.3"
35
35
  },
@@ -73,5 +73,5 @@
73
73
  "node_modules/",
74
74
  "dist/"
75
75
  ],
76
- "gitHead": "9c71040bb28a0eb93c7f0b7bc9afce8d2c8d3cbb"
76
+ "gitHead": "d17b898bee0be82259fc1b88f46106a927bf81aa"
77
77
  }
@@ -5,4 +5,4 @@ import { ExpoConfig } from '@expo/config-types';
5
5
  * Create `com.google.firebase.messaging.default_notification_icon` and `com.google.firebase.messaging.default_notification_color`
6
6
  */
7
7
  export declare const withExpoPluginFirebaseNotification: ConfigPlugin;
8
- export declare function setFireBaseMessagingAndroidManifest(config: ExpoConfig, application: ManifestApplication): ManifestApplication | ExpoConfig;
8
+ export declare function setFireBaseMessagingAndroidManifest(config: ExpoConfig, application: ManifestApplication): ManifestApplication;
@@ -25,18 +25,48 @@ const withExpoPluginFirebaseNotification = config => {
25
25
  });
26
26
  };
27
27
  exports.withExpoPluginFirebaseNotification = withExpoPluginFirebaseNotification;
28
+ // Helper function to get notification icon and color from either config.notification or expo-notifications plugin
29
+ const getNotificationConfig = (config) => {
30
+ // Check expo-notifications plugin
31
+ if (config.plugins) {
32
+ const expoNotificationsPlugin = config.plugins.find(plugin => Array.isArray(plugin) && plugin[0] === 'expo-notifications');
33
+ if (expoNotificationsPlugin && Array.isArray(expoNotificationsPlugin)) {
34
+ const pluginConfig = expoNotificationsPlugin[1];
35
+ if (pluginConfig && typeof pluginConfig === 'object') {
36
+ return {
37
+ icon: pluginConfig.icon,
38
+ color: pluginConfig.color,
39
+ };
40
+ }
41
+ }
42
+ }
43
+ /**
44
+ * @deprecated
45
+ * Get notification config from config.notification
46
+ * Will be removed in the future as `expo-notifications` plugin is the recommended way to configure notifications.
47
+ */
48
+ // @ts-ignore - config.notification deprecated in Expo 54 / removed in Expo 55+, but still useful for people
49
+ if (config.notification) {
50
+ return {
51
+ // @ts-ignore - config.notification deprecated in Expo 54 / removed in Expo 55+, but still useful for people
52
+ icon: config.notification.icon,
53
+ // @ts-ignore - config.notification deprecated in Expo 54 / removed in Expo 55+, but still useful for people
54
+ color: config.notification.color,
55
+ };
56
+ }
57
+ return { icon: undefined, color: undefined };
58
+ };
28
59
  function setFireBaseMessagingAndroidManifest(config, application) {
29
- // If the notification object is not defined, print a friendly warning
30
- if (!config.notification) {
60
+ const { icon, color } = getNotificationConfig(config);
61
+ if (!icon) {
31
62
  // This warning is important because the notification icon can only use pure white on Android. By default, the system uses the app icon as the notification icon, but the app icon is usually not pure white, so you need to set the notification icon
32
63
  // eslint-disable-next-line no-console
33
64
  console.warn('For Android 8.0 and above, it is necessary to set the notification icon to ensure correct display. Otherwise, the notification will not show the correct icon. For more information, visit https://docs.expo.dev/versions/latest/config/app/#notification');
34
- return config;
35
65
  }
36
66
  // Defensive code
37
67
  application['meta-data'] ??= [];
38
68
  const metaData = application['meta-data'];
39
- if (config.notification.icon &&
69
+ if (icon &&
40
70
  !hasMetaData(application, 'com.google.firebase.messaging.default_notification_icon')) {
41
71
  // Expo will automatically create '@drawable/notification_icon' resource if you specify config.notification.icon.
42
72
  metaData.push({
@@ -46,7 +76,7 @@ function setFireBaseMessagingAndroidManifest(config, application) {
46
76
  },
47
77
  });
48
78
  }
49
- if (config.notification.color &&
79
+ if (color &&
50
80
  !hasMetaData(application, 'com.google.firebase.messaging.default_notification_color')) {
51
81
  metaData.push({
52
82
  $: {
@@ -26,18 +26,54 @@ export const withExpoPluginFirebaseNotification: ConfigPlugin = config => {
26
26
  });
27
27
  };
28
28
 
29
+ // Helper function to get notification icon and color from either config.notification or expo-notifications plugin
30
+ const getNotificationConfig = (config: ExpoConfig) => {
31
+ // Check expo-notifications plugin
32
+ if (config.plugins) {
33
+ const expoNotificationsPlugin = config.plugins.find(
34
+ plugin => Array.isArray(plugin) && plugin[0] === 'expo-notifications',
35
+ );
36
+
37
+ if (expoNotificationsPlugin && Array.isArray(expoNotificationsPlugin)) {
38
+ const pluginConfig = expoNotificationsPlugin[1];
39
+ if (pluginConfig && typeof pluginConfig === 'object') {
40
+ return {
41
+ icon: pluginConfig.icon,
42
+ color: pluginConfig.color,
43
+ };
44
+ }
45
+ }
46
+ }
47
+
48
+ /**
49
+ * @deprecated
50
+ * Get notification config from config.notification
51
+ * Will be removed in the future as `expo-notifications` plugin is the recommended way to configure notifications.
52
+ */
53
+ // @ts-ignore - config.notification deprecated in Expo 54 / removed in Expo 55+, but still useful for people
54
+ if (config.notification) {
55
+ return {
56
+ // @ts-ignore - config.notification deprecated in Expo 54 / removed in Expo 55+, but still useful for people
57
+ icon: config.notification.icon,
58
+ // @ts-ignore - config.notification deprecated in Expo 54 / removed in Expo 55+, but still useful for people
59
+ color: config.notification.color,
60
+ };
61
+ }
62
+
63
+ return { icon: undefined, color: undefined };
64
+ };
65
+
29
66
  export function setFireBaseMessagingAndroidManifest(
30
67
  config: ExpoConfig,
31
68
  application: ManifestApplication,
32
69
  ) {
33
- // If the notification object is not defined, print a friendly warning
34
- if (!config.notification) {
70
+ const { icon, color } = getNotificationConfig(config);
71
+ if (!icon) {
35
72
  // This warning is important because the notification icon can only use pure white on Android. By default, the system uses the app icon as the notification icon, but the app icon is usually not pure white, so you need to set the notification icon
36
73
  // eslint-disable-next-line no-console
37
74
  console.warn(
38
75
  'For Android 8.0 and above, it is necessary to set the notification icon to ensure correct display. Otherwise, the notification will not show the correct icon. For more information, visit https://docs.expo.dev/versions/latest/config/app/#notification',
39
76
  );
40
- return config;
41
77
  }
42
78
 
43
79
  // Defensive code
@@ -46,7 +82,7 @@ export function setFireBaseMessagingAndroidManifest(
46
82
  const metaData = application['meta-data'];
47
83
 
48
84
  if (
49
- config.notification.icon &&
85
+ icon &&
50
86
  !hasMetaData(application, 'com.google.firebase.messaging.default_notification_icon')
51
87
  ) {
52
88
  // Expo will automatically create '@drawable/notification_icon' resource if you specify config.notification.icon.
@@ -59,7 +95,7 @@ export function setFireBaseMessagingAndroidManifest(
59
95
  }
60
96
 
61
97
  if (
62
- config.notification.color &&
98
+ color &&
63
99
  !hasMetaData(application, 'com.google.firebase.messaging.default_notification_color')
64
100
  ) {
65
101
  metaData.push({