@react-native-firebase/messaging 18.8.0 → 18.9.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
+ ## [18.9.0](https://github.com/invertase/react-native-firebase/compare/v18.8.0...v18.9.0) (2024-02-21)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **auth:** use correct app instance (vs always default) in multifactor and phone auth ([#7564](https://github.com/invertase/react-native-firebase/issues/7564)) ([ff32fd3](https://github.com/invertase/react-native-firebase/commit/ff32fd37b39557e9a55fce016cbf986348436b92))
11
+ - **messaging, ios:** resolve getAPNSToken promise in all cases ([b30eee1](https://github.com/invertase/react-native-firebase/commit/b30eee1b97b4290474c00607342befda55272075)), closes [#7272](https://github.com/invertase/react-native-firebase/issues/7272)
12
+
6
13
  ## [18.8.0](https://github.com/invertase/react-native-firebase/compare/v18.7.3...v18.8.0) (2024-01-25)
7
14
 
8
15
  **Note:** Version bump only for package @react-native-firebase/messaging
@@ -118,10 +118,15 @@
118
118
  didReceiveRemoteNotification:(NSDictionary *)userInfo
119
119
  fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
120
120
  #if __has_include(<FirebaseAuth/FirebaseAuth.h>)
121
- if ([[FIRAuth auth] canHandleNotification:userInfo]) {
122
- DLog(@"didReceiveRemoteNotification Firebase Auth handeled the notification");
123
- completionHandler(UIBackgroundFetchResultNoData);
124
- return;
121
+
122
+ for (id appId in [FIRApp allApps]) {
123
+ FIRApp *app = [[FIRApp allApps] objectForKey:appId];
124
+ if ([[FIRAuth authWithApp:app] canHandleNotification:userInfo]) {
125
+ DLog(@"didReceiveRemoteNotification Firebase Auth handled the notification with instance: %@",
126
+ app.name);
127
+ completionHandler(UIBackgroundFetchResultNoData);
128
+ return;
129
+ }
125
130
  }
126
131
 
127
132
  // If the notification is a probe notification, always call the completion
@@ -237,4 +242,4 @@
237
242
  }
238
243
  }
239
244
 
240
- @end
245
+ @end
@@ -173,8 +173,9 @@ RCT_EXPORT_METHOD(getAPNSToken : (RCTPromiseResolveBlock)resolve : (RCTPromiseRe
173
173
  resolve([NSNull null]);
174
174
  return;
175
175
  #endif
176
- DLog(@"RNFBMessaging getAPNSToken - ARM64 Simulator detected, but no APNS token set. Assuming "
177
- @"APNS token is possible. macOS13+ / iOS16+ / M1 mac required for assumption to be valid. "
176
+ DLog(@"RNFBMessaging getAPNSToken - ARM64 Simulator detected, but no APNS token available. "
177
+ @"APNS token may be possible. macOS13+ / iOS16+ / M1 mac required for assumption to be "
178
+ @"valid. "
178
179
  @"Use setAPNSToken in testing if needed.");
179
180
  #endif
180
181
  if ([UIApplication sharedApplication].isRegisteredForRemoteNotifications == NO) {
@@ -188,6 +189,7 @@ RCT_EXPORT_METHOD(getAPNSToken : (RCTPromiseResolveBlock)resolve : (RCTPromiseRe
188
189
  }];
189
190
  return;
190
191
  }
192
+ resolve([NSNull null]);
191
193
  }
192
194
  }
193
195
 
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '18.8.0';
2
+ module.exports = '18.9.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/messaging",
3
- "version": "18.8.0",
3
+ "version": "18.9.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": "18.8.0",
27
+ "@react-native-firebase/app": "18.9.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": "970756d733e1c4642b53d91c5b1b8f58a8f5dbc0"
41
+ "gitHead": "695265641dcf2243ab9f27b25776f11616225f68"
42
42
  }