@react-native-firebase/messaging 20.4.0 → 20.5.0
Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
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
|
+
## [20.5.0](https://github.com/invertase/react-native-firebase/compare/v20.4.0...v20.5.0) (2024-09-11)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **messaging, android:** handle nullable broadcast intent ([#7893](https://github.com/invertase/react-native-firebase/issues/7893)) ([#7960](https://github.com/invertase/react-native-firebase/issues/7960)) ([c1ac022](https://github.com/invertase/react-native-firebase/commit/c1ac022e4e9d3effb2f0fb3404ad375d9fcbe4b6))
|
11
|
+
- **messaging, ios:** fixed isHeadless for react-native-navigation ([#7868](https://github.com/invertase/react-native-firebase/issues/7868)) ([3875cc6](https://github.com/invertase/react-native-firebase/commit/3875cc6077e5fd6b35e201356aca632e43a2e301))
|
12
|
+
|
6
13
|
## [20.4.0](https://github.com/invertase/react-native-firebase/compare/v20.3.0...v20.4.0) (2024-08-13)
|
7
14
|
|
8
15
|
**Note:** Version bump only for package @react-native-firebase/messaging
|
@@ -22,6 +22,10 @@ public class ReactNativeFirebaseMessagingReceiver extends BroadcastReceiver {
|
|
22
22
|
if (ReactNativeFirebaseApp.getApplicationContext() == null) {
|
23
23
|
ReactNativeFirebaseApp.setApplicationContext(context.getApplicationContext());
|
24
24
|
}
|
25
|
+
if (intent.getExtras() == null) {
|
26
|
+
Log.e(TAG, "broadcast intent received with no extras");
|
27
|
+
return;
|
28
|
+
}
|
25
29
|
RemoteMessage remoteMessage = new RemoteMessage(intent.getExtras());
|
26
30
|
ReactNativeFirebaseEventEmitter emitter = ReactNativeFirebaseEventEmitter.getSharedInstance();
|
27
31
|
|
@@ -96,8 +96,8 @@
|
|
96
96
|
|
97
97
|
if (notification.userInfo[UIApplicationLaunchOptionsRemoteNotificationKey]) {
|
98
98
|
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
|
99
|
+
isHeadless = YES;
|
99
100
|
if (rctRootView != nil) {
|
100
|
-
isHeadless = YES;
|
101
101
|
NSMutableDictionary *appPropertiesDict = rctRootView.appProperties != nil
|
102
102
|
? [rctRootView.appProperties mutableCopy]
|
103
103
|
: [NSMutableDictionary dictionary];
|
@@ -120,8 +120,8 @@
|
|
120
120
|
[[UIApplication sharedApplication] registerForRemoteNotifications];
|
121
121
|
// #endif
|
122
122
|
} else {
|
123
|
+
isHeadless = NO;
|
123
124
|
if (rctRootView != nil) {
|
124
|
-
isHeadless = NO;
|
125
125
|
NSMutableDictionary *appPropertiesDict = rctRootView.appProperties != nil
|
126
126
|
? [rctRootView.appProperties mutableCopy]
|
127
127
|
: [NSMutableDictionary dictionary];
|
@@ -133,8 +133,8 @@
|
|
133
133
|
}
|
134
134
|
}
|
135
135
|
} else {
|
136
|
+
isHeadless = NO;
|
136
137
|
if (rctRootView != nil) {
|
137
|
-
isHeadless = NO;
|
138
138
|
NSMutableDictionary *appPropertiesDict = rctRootView.appProperties != nil
|
139
139
|
? [rctRootView.appProperties mutableCopy]
|
140
140
|
: [NSMutableDictionary dictionary];
|
@@ -148,6 +148,7 @@
|
|
148
148
|
}
|
149
149
|
|
150
150
|
- (void)application_onDidEnterForeground {
|
151
|
+
isHeadless = NO;
|
151
152
|
if ([UIApplication sharedApplication].delegate != nil &&
|
152
153
|
[UIApplication sharedApplication].delegate.window != nil &&
|
153
154
|
[UIApplication sharedApplication].delegate.window.rootViewController != nil &&
|
@@ -160,7 +161,6 @@
|
|
160
161
|
if (rctRootView.appProperties != nil &&
|
161
162
|
[rctRootView.appProperties[@"isHeadless"] isEqual:@(YES)]) {
|
162
163
|
NSMutableDictionary *appPropertiesDict = [rctRootView.appProperties mutableCopy];
|
163
|
-
isHeadless = NO;
|
164
164
|
if ([appPropertiesDict objectForKey:@"isHeadless"] != nil &&
|
165
165
|
[appPropertiesDict[@"isHeadless"] isEqual:@([RCTConvert BOOL:@(YES)])]) {
|
166
166
|
appPropertiesDict[@"isHeadless"] = @([RCTConvert BOOL:@(isHeadless)]);
|
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '20.
|
2
|
+
module.exports = '20.5.0';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/messaging",
|
3
|
-
"version": "20.
|
3
|
+
"version": "20.5.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": "20.
|
27
|
+
"@react-native-firebase/app": "20.5.0",
|
28
28
|
"expo": ">=47.0.0"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
@@ -38,5 +38,5 @@
|
|
38
38
|
"publishConfig": {
|
39
39
|
"access": "public"
|
40
40
|
},
|
41
|
-
"gitHead": "
|
41
|
+
"gitHead": "daf2bc9086c14bbb0e1b02a4d4274b7060263eb1"
|
42
42
|
}
|