@react-native-firebase/messaging 22.2.1 → 22.4.0

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,14 @@
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
+ ## [22.4.0](https://github.com/invertase/react-native-firebase/compare/v22.3.0...v22.4.0) (2025-07-10)
7
+
8
+ **Note:** Version bump only for package @react-native-firebase/messaging
9
+
10
+ ## [22.3.0](https://github.com/invertase/react-native-firebase/compare/v22.2.1...v22.3.0) (2025-07-08)
11
+
12
+ **Note:** Version bump only for package @react-native-firebase/messaging
13
+
6
14
  ## [22.2.1](https://github.com/invertase/react-native-firebase/compare/v22.2.0...v22.2.1) (2025-06-10)
7
15
 
8
16
  **Note:** Version bump only for package @react-native-firebase/messaging
@@ -1,4 +1,6 @@
1
1
  import { getApp } from '@react-native-firebase/app';
2
+ import { withModularFlag } from '@react-native-firebase/app/lib/common';
3
+ import { MODULAR_DEPRECATION_ARG } from '@react-native-firebase/app/lib/common';
2
4
 
3
5
  /**
4
6
  * @typedef {import('..').FirebaseMessagingTypes} FirebaseMessagingTypes
@@ -33,7 +35,7 @@ export function getMessaging(app) {
33
35
  * @returns {Promise<void>}
34
36
  */
35
37
  export function deleteToken(messaging, tokenOptions) {
36
- return messaging.deleteToken(tokenOptions);
38
+ return messaging.deleteToken.call(messaging, tokenOptions, MODULAR_DEPRECATION_ARG);
37
39
  }
38
40
 
39
41
  /**
@@ -43,7 +45,7 @@ export function deleteToken(messaging, tokenOptions) {
43
45
  * @returns {Promise<string>}
44
46
  */
45
47
  export function getToken(messaging, options) {
46
- return messaging.getToken(options);
48
+ return messaging.getToken.call(messaging, options, MODULAR_DEPRECATION_ARG);
47
49
  }
48
50
 
49
51
  /**
@@ -54,7 +56,7 @@ export function getToken(messaging, options) {
54
56
  * @returns {() => void}
55
57
  */
56
58
  export function onMessage(messaging, listener) {
57
- return messaging.onMessage(listener);
59
+ return messaging.onMessage.call(messaging, listener, MODULAR_DEPRECATION_ARG);
58
60
  }
59
61
 
60
62
  /**
@@ -65,7 +67,7 @@ export function onMessage(messaging, listener) {
65
67
  * @returns {() => void}
66
68
  */
67
69
  export function onNotificationOpenedApp(messaging, listener) {
68
- return messaging.onNotificationOpenedApp(listener);
70
+ return messaging.onNotificationOpenedApp.call(messaging, listener, MODULAR_DEPRECATION_ARG);
69
71
  }
70
72
 
71
73
  /**
@@ -77,7 +79,7 @@ export function onNotificationOpenedApp(messaging, listener) {
77
79
  * @returns {() => void}
78
80
  */
79
81
  export function onTokenRefresh(messaging, listener) {
80
- return messaging.onTokenRefresh(listener);
82
+ return messaging.onTokenRefresh.call(messaging, listener, MODULAR_DEPRECATION_ARG);
81
83
  }
82
84
 
83
85
  /**
@@ -88,7 +90,7 @@ export function onTokenRefresh(messaging, listener) {
88
90
  * @returns {Promise<AuthorizationStatus>}
89
91
  */
90
92
  export function requestPermission(messaging, iosPermissions) {
91
- return messaging.requestPermission(iosPermissions);
93
+ return messaging.requestPermission.call(messaging, iosPermissions, MODULAR_DEPRECATION_ARG);
92
94
  }
93
95
 
94
96
  /**
@@ -97,7 +99,7 @@ export function requestPermission(messaging, iosPermissions) {
97
99
  * @returns {boolean}
98
100
  */
99
101
  export function isAutoInitEnabled(messaging) {
100
- return messaging.isAutoInitEnabled;
102
+ return withModularFlag(() => messaging.isAutoInitEnabled);
101
103
  }
102
104
 
103
105
  /**
@@ -107,7 +109,7 @@ export function isAutoInitEnabled(messaging) {
107
109
  * @returns {Promise<void>}
108
110
  */
109
111
  export function setAutoInitEnabled(messaging, enabled) {
110
- return messaging.setAutoInitEnabled(enabled);
112
+ return messaging.setAutoInitEnabled.call(messaging, enabled, MODULAR_DEPRECATION_ARG);
111
113
  }
112
114
 
113
115
  /**
@@ -118,7 +120,7 @@ export function setAutoInitEnabled(messaging, enabled) {
118
120
  * @returns {Promise<RemoteMessage | null>}
119
121
  */
120
122
  export function getInitialNotification(messaging) {
121
- return messaging.getInitialNotification();
123
+ return messaging.getInitialNotification.call(messaging, MODULAR_DEPRECATION_ARG);
122
124
  }
123
125
 
124
126
  /**
@@ -128,7 +130,7 @@ export function getInitialNotification(messaging) {
128
130
  * @returns {Promise<boolean>}
129
131
  */
130
132
  export function getDidOpenSettingsForNotification(messaging) {
131
- return messaging.getDidOpenSettingsForNotification();
133
+ return messaging.getDidOpenSettingsForNotification.call(messaging, MODULAR_DEPRECATION_ARG);
132
134
  }
133
135
 
134
136
  /**
@@ -138,7 +140,7 @@ export function getDidOpenSettingsForNotification(messaging) {
138
140
  * @returns {Promise<boolean>}
139
141
  */
140
142
  export function getIsHeadless(messaging) {
141
- return messaging.getIsHeadless();
143
+ return messaging.getIsHeadless.call(messaging, MODULAR_DEPRECATION_ARG);
142
144
  }
143
145
 
144
146
  /**
@@ -148,7 +150,7 @@ export function getIsHeadless(messaging) {
148
150
  * @returns {Promise<void>}
149
151
  */
150
152
  export function registerDeviceForRemoteMessages(messaging) {
151
- return messaging.registerDeviceForRemoteMessages();
153
+ return messaging.registerDeviceForRemoteMessages.call(messaging, MODULAR_DEPRECATION_ARG);
152
154
  }
153
155
 
154
156
  /**
@@ -158,7 +160,7 @@ export function registerDeviceForRemoteMessages(messaging) {
158
160
  * @returns {boolean}
159
161
  */
160
162
  export function isDeviceRegisteredForRemoteMessages(messaging) {
161
- return messaging.isDeviceRegisteredForRemoteMessages;
163
+ return withModularFlag(() => messaging.isDeviceRegisteredForRemoteMessages);
162
164
  }
163
165
 
164
166
  /**
@@ -167,7 +169,7 @@ export function isDeviceRegisteredForRemoteMessages(messaging) {
167
169
  * @returns {Promise<void>}
168
170
  */
169
171
  export function unregisterDeviceForRemoteMessages(messaging) {
170
- return messaging.unregisterDeviceForRemoteMessages();
172
+ return messaging.unregisterDeviceForRemoteMessages.call(messaging, MODULAR_DEPRECATION_ARG);
171
173
  }
172
174
 
173
175
  /**
@@ -177,7 +179,7 @@ export function unregisterDeviceForRemoteMessages(messaging) {
177
179
  * @returns {Promise<string | null>}
178
180
  */
179
181
  export function getAPNSToken(messaging) {
180
- return messaging.getAPNSToken();
182
+ return messaging.getAPNSToken.call(messaging, MODULAR_DEPRECATION_ARG);
181
183
  }
182
184
 
183
185
  /**
@@ -204,7 +206,7 @@ export function getAPNSToken(messaging) {
204
206
  * @returns {Promise<void>}
205
207
  */
206
208
  export function setAPNSToken(messaging, token, type) {
207
- return messaging.setAPNSToken(token, type);
209
+ return messaging.setAPNSToken.call(messaging, token, type, MODULAR_DEPRECATION_ARG);
208
210
  }
209
211
 
210
212
  /**
@@ -213,7 +215,7 @@ export function setAPNSToken(messaging, token, type) {
213
215
  * @returns {Promise<AuthorizationStatus>}
214
216
  */
215
217
  export function hasPermission(messaging) {
216
- return messaging.hasPermission();
218
+ return messaging.hasPermission.call(messaging, MODULAR_DEPRECATION_ARG);
217
219
  }
218
220
 
219
221
  /**
@@ -223,7 +225,7 @@ export function hasPermission(messaging) {
223
225
  * @returns {() => void}
224
226
  */
225
227
  export function onDeletedMessages(messaging, listener) {
226
- return messaging.onDeletedMessages(listener);
228
+ return messaging.onDeletedMessages.call(messaging, listener, MODULAR_DEPRECATION_ARG);
227
229
  }
228
230
 
229
231
  /**
@@ -233,7 +235,7 @@ export function onDeletedMessages(messaging, listener) {
233
235
  * @returns {() => void}
234
236
  */
235
237
  export function onMessageSent(messaging, listener) {
236
- return messaging.onMessageSent(listener);
238
+ return messaging.onMessageSent.call(messaging, listener, MODULAR_DEPRECATION_ARG);
237
239
  }
238
240
 
239
241
  /**
@@ -243,7 +245,7 @@ export function onMessageSent(messaging, listener) {
243
245
  * @returns {() => void}
244
246
  */
245
247
  export function onSendError(messaging, listener) {
246
- return messaging.onSendError(listener);
248
+ return messaging.onSendError.call(messaging, listener, MODULAR_DEPRECATION_ARG);
247
249
  }
248
250
 
249
251
  /**
@@ -255,7 +257,7 @@ export function onSendError(messaging, listener) {
255
257
  * @returns {void}
256
258
  */
257
259
  export function setBackgroundMessageHandler(messaging, handler) {
258
- return messaging.setBackgroundMessageHandler(handler);
260
+ return messaging.setBackgroundMessageHandler.call(messaging, handler, MODULAR_DEPRECATION_ARG);
259
261
  }
260
262
 
261
263
  /**
@@ -266,7 +268,11 @@ export function setBackgroundMessageHandler(messaging, handler) {
266
268
  * @returns {void}
267
269
  */
268
270
  export function setOpenSettingsForNotificationsHandler(messaging, handler) {
269
- return messaging.setOpenSettingsForNotificationsHandler(handler);
271
+ return messaging.setOpenSettingsForNotificationsHandler.call(
272
+ messaging,
273
+ handler,
274
+ MODULAR_DEPRECATION_ARG,
275
+ );
270
276
  }
271
277
 
272
278
  /**
@@ -276,7 +282,7 @@ export function setOpenSettingsForNotificationsHandler(messaging, handler) {
276
282
  * @returns {Promise<void>}
277
283
  */
278
284
  export function sendMessage(messaging, message) {
279
- return messaging.sendMessage(message);
285
+ return messaging.sendMessage.call(messaging, message, MODULAR_DEPRECATION_ARG);
280
286
  }
281
287
 
282
288
  /**
@@ -287,7 +293,7 @@ export function sendMessage(messaging, message) {
287
293
  * @returns {Promise<void>}
288
294
  */
289
295
  export function subscribeToTopic(messaging, topic) {
290
- return messaging.subscribeToTopic(topic);
296
+ return messaging.subscribeToTopic.call(messaging, topic, MODULAR_DEPRECATION_ARG);
291
297
  }
292
298
 
293
299
  /**
@@ -297,7 +303,7 @@ export function subscribeToTopic(messaging, topic) {
297
303
  * @returns {Promise<void>}
298
304
  */
299
305
  export function unsubscribeFromTopic(messaging, topic) {
300
- return messaging.unsubscribeFromTopic(topic);
306
+ return messaging.unsubscribeFromTopic.call(messaging, topic, MODULAR_DEPRECATION_ARG);
301
307
  }
302
308
 
303
309
  /**
@@ -306,7 +312,7 @@ export function unsubscribeFromTopic(messaging, topic) {
306
312
  * @returns {boolean}
307
313
  */
308
314
  export function isDeliveryMetricsExportToBigQueryEnabled(messaging) {
309
- return messaging.isDeliveryMetricsExportToBigQueryEnabled;
315
+ return withModularFlag(() => messaging.isDeliveryMetricsExportToBigQueryEnabled);
310
316
  }
311
317
 
312
318
  /**
@@ -316,7 +322,7 @@ export function isDeliveryMetricsExportToBigQueryEnabled(messaging) {
316
322
  * @returns {boolean}
317
323
  */
318
324
  export function isNotificationDelegationEnabled(messaging) {
319
- return messaging.isNotificationDelegationEnabled;
325
+ return withModularFlag(() => messaging.isNotificationDelegationEnabled);
320
326
  }
321
327
 
322
328
  /**
@@ -328,7 +334,11 @@ export function isNotificationDelegationEnabled(messaging) {
328
334
  * @returns {Promise<void>}
329
335
  */
330
336
  export function setNotificationDelegationEnabled(messaging, enabled) {
331
- return messaging.setNotificationDelegationEnabled(enabled);
337
+ return messaging.setNotificationDelegationEnabled.call(
338
+ messaging,
339
+ enabled,
340
+ MODULAR_DEPRECATION_ARG,
341
+ );
332
342
  }
333
343
 
334
344
  /**
@@ -337,7 +347,7 @@ export function setNotificationDelegationEnabled(messaging, enabled) {
337
347
  * @returns {boolean}
338
348
  */
339
349
  export function isSupported(messaging) {
340
- return messaging.isSupported();
350
+ return messaging.isSupported.call(messaging, MODULAR_DEPRECATION_ARG);
341
351
  }
342
352
 
343
353
  /**
@@ -348,7 +358,11 @@ export function isSupported(messaging) {
348
358
  * @returns {Promise<void>}
349
359
  */
350
360
  export function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging, enabled) {
351
- return messaging.setDeliveryMetricsExportToBigQuery(enabled);
361
+ return messaging.setDeliveryMetricsExportToBigQuery.call(
362
+ messaging,
363
+ enabled,
364
+ MODULAR_DEPRECATION_ARG,
365
+ );
352
366
  }
353
367
 
354
368
  export {
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '22.2.1';
2
+ module.exports = '22.4.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/messaging",
3
- "version": "22.2.1",
3
+ "version": "22.4.0",
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": "lib/index.js",
@@ -24,7 +24,7 @@
24
24
  "messaging"
25
25
  ],
26
26
  "peerDependencies": {
27
- "@react-native-firebase/app": "22.2.1",
27
+ "@react-native-firebase/app": "22.4.0",
28
28
  "expo": ">=47.0.0"
29
29
  },
30
30
  "devDependencies": {
@@ -39,5 +39,5 @@
39
39
  "access": "public",
40
40
  "provenance": true
41
41
  },
42
- "gitHead": "d0fa58166a3fd79c7a951161fa83d0421ae72c93"
42
+ "gitHead": "7eaaf185aab15c7e4fc3c218af9be609fe7e0030"
43
43
  }