@react-native-firebase/messaging 15.2.0 → 15.3.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,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
+ # [15.3.0](https://github.com/invertase/react-native-firebase/compare/v15.2.0...v15.3.0) (2022-08-07)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **ios, messaging:** depend directly on FirebaseCoreExtension pod ([62ee54b](https://github.com/invertase/react-native-firebase/commit/62ee54b8a7d273430cbebf88af1d8a96fed6a6a6)), closes [#6403](https://github.com/invertase/react-native-firebase/issues/6403) [#6352](https://github.com/invertase/react-native-firebase/issues/6352)
11
+ - **messaging, ios:** eliminate auth/messaging notification race ([#6455](https://github.com/invertase/react-native-firebase/issues/6455)) ([7183118](https://github.com/invertase/react-native-firebase/commit/71831188a4d90800cce424a5a3cfb29978391bd3))
12
+
6
13
  # [15.2.0](https://github.com/invertase/react-native-firebase/compare/v15.1.1...v15.2.0) (2022-07-21)
7
14
 
8
15
  ### Features
@@ -28,6 +28,7 @@ Pod::Spec.new do |s|
28
28
  s.dependency 'React-Core'
29
29
  s.dependency 'RNFBApp'
30
30
 
31
+
31
32
  if defined?($FirebaseSDKVersion)
32
33
  Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
33
34
  firebase_sdk_version = $FirebaseSDKVersion
@@ -35,6 +36,7 @@ Pod::Spec.new do |s|
35
36
 
36
37
  # Firebase dependencies
37
38
  s.dependency 'Firebase/Messaging', firebase_sdk_version
39
+ s.dependency 'FirebaseCoreExtension', firebase_sdk_version
38
40
 
39
41
  if defined?($RNFirebaseAsStaticFramework)
40
42
  Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"
@@ -123,6 +123,24 @@
123
123
  completionHandler(UIBackgroundFetchResultNoData);
124
124
  return;
125
125
  }
126
+
127
+ // If the notification is a probe notification, always call the completion
128
+ // handler with UIBackgroundFetchResultNoData.
129
+ //
130
+ // This fixes a race condition between `FIRAuth/didReceiveRemoteNotification` and this
131
+ // module causing detox to hang when `FIRAuth/didReceiveRemoteNotification` is called first.
132
+ // see
133
+ // https://stackoverflow.com/questions/72044950/detox-tests-hang-with-pending-items-on-dispatch-queue/72989494
134
+ NSDictionary *data = userInfo[@"com.google.firebase.auth"];
135
+ if ([data isKindOfClass:[NSString class]]) {
136
+ // Deserialize in case the data is a JSON string.
137
+ NSData *JSONData = [((NSString *)data) dataUsingEncoding:NSUTF8StringEncoding];
138
+ data = [NSJSONSerialization JSONObjectWithData:JSONData options:0 error:NULL];
139
+ }
140
+ if ([data isKindOfClass:[NSDictionary class]] && data[@"warning"]) {
141
+ completionHandler(UIBackgroundFetchResultNoData);
142
+ return;
143
+ }
126
144
  #endif
127
145
 
128
146
  [[NSNotificationCenter defaultCenter]
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '15.2.0';
2
+ module.exports = '15.3.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/messaging",
3
- "version": "15.2.0",
3
+ "version": "15.3.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",
@@ -22,10 +22,10 @@
22
22
  "messaging"
23
23
  ],
24
24
  "peerDependencies": {
25
- "@react-native-firebase/app": "15.2.0"
25
+ "@react-native-firebase/app": "15.3.0"
26
26
  },
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "8fb859fb000d5c2c6bbb81dffc685e94ef1ba350"
30
+ "gitHead": "97f6e273efaac64d8a62eae4be390289e69d506b"
31
31
  }