---
title: v6.4.0
description: 'Messaging focused release with features, bug fixes and documentation updates.'
---

## Features

- `iOS`: added a `Podfile` option to allow using React Native Firebase packages as static frameworks ([`#3253`](https://github.com/invertase/react-native-firebase/issues/3253)) ([`#530f8bb`](https://github.com/invertase/react-native-firebase/commit/530f8bbb51f89f106854dbf1df5ec80211e2cf8b))
  - see [Allow iOS Static Frameworks](/#allow-ios-static-frameworks) to learn more. This option will default to true in the next major release.

### Messaging

- added support for `onNotificationOpenedApp` & `getInitialNotification` APIs.
  - these can be used to detect if a user opened the app via pressing a notification. ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
- the `RemoteMessage` event (e.g. via `onMessage`) now includes a notification payload (if present). ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
- `setBackgroundMessageHandler` now supported on iOS. ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
- the iOS permissions API has been upgraded to now support custom permissions.
  - the permission API selects sensible defaults, however; allows you to fully customize them if required.
  - provisional permissions are now disabled by default (previously, it was enabled by default for iOS 12+ devices). ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
- the `requestPermission` & `hasPermission` APIs now returns the current authorization status as an enum, rather than a boolean value.
  - see [`AuthorizationStatus`](https://invertase.github.io/react-native-firebase/_react-native-firebase/messaging/modular/AuthorizationStatus.html) reference documentation for available enum members

---

## Bug Fixes

- `iOS`: update `in-app-messaging` dependency to latest package name in iOS `InAppMessaging` ([`#166692d`](https://github.com/invertase/react-native-firebase/commit/166692d68ef396f3e8664edd7feab7c80038004b))

### Analytics

- logging event parameters can be objects and arrays ([`#2876`](https://github.com/invertase/react-native-firebase/issues/2876)) ([`#eebfb04`](https://github.com/invertase/react-native-firebase/commit/eebfb04a7c0a856a9d5d311ae99138df9ab90c3b))
- update `logEvent` types ([`#65ec7eb`](https://github.com/invertase/react-native-firebase/commit/65ec7eb431712f8c4d3cf96c24489e6a13ef4e13))

### Authentication

- `user.metadata.lastSignInTime` & `user.metadata.creationTime` now correctly return an ISO date string ([`#2555`](https://github.com/invertase/react-native-firebase/issues/2555)) ([`#8adef65`](https://github.com/invertase/react-native-firebase/commit/8adef653faa008e0146374f99f5ba1af902749bf))

### Dynamic Links

- switch `ShortLinkType` interface to an enum ([`#870d0a1`](https://github.com/invertase/react-native-firebase/commit/870d0a198692c65d2857765d1b216738ec74856f))
- fix links options not correctly applied in iOS ([`#54bc6f8`](https://github.com/invertase/react-native-firebase/commit/54bc6f8403b12a8cfaf0b862d13310ef28076d06))
- fix missing return statement causing bug in iOS ([`#3315`](https://github.com/invertase/react-native-firebase/issues/3315)) ([`#1661f6e`](https://github.com/invertase/react-native-firebase/commit/1661f6e084c47ed835cc4539c654286964a6d9a8))

### Firestore

- improve Firestore query validation;
- `where` field parameter cannot match `orderBy` parameter ([`#6311dc8`](https://github.com/invertase/react-native-firebase/commit/6311dc8f68e6cf0605d2f306885d2fbc0ef779d6))
- field path cannot be used with a `orderBy` parameter ([`#ea19622`](https://github.com/invertase/react-native-firebase/commit/b90a736fc8f9a1b25239bb68e5a62de711b673c7))

### Functions

- correctly throw an `UNAVAILABLE` error code on network IO errors for Android to match iOS ([`#3310`](https://github.com/invertase/react-native-firebase/issues/3310)) ([`#7351147`](https://github.com/invertase/react-native-firebase/commit/73511472bd7690158f3d9924d5f4d8c0cad69910))

### Messaging

- `onMessage` now works correctly for `data-only`, `notification-only` & `data-notification` messages. Previously it only worked for `data-only` messages
- `setBackgroundMessageHandler` now works when the app fully quit or backgrounded, for `data-only`, `notification-only` & `data-notification` messages. Previously, when the app was fully quit, events were not being handled
  - for iOS this requires `content-available` to be set
- add better handling for messages in cases where no user handler has been set
- `Android`: ensure a default notification color is always present when user does not set one
- `iOS`: calling `registerDeviceForRemoteMessages`/`registerForRemoteNotifications` was incorrectly causing permissions to be requested before explicitly requesting them via the messaging API
- `iOS`: registering the device was not being called if it was already registered internally.
  - Devices should **always** register with `registerDeviceForRemoteMessages`, as per Apple guidelines, regardless of current registration status.
  - Make sure you **always** call `registerDeviceForRemoteMessages` during your app initialization on iOS
- `iOS`: in cases where requesting an FCM with the default `scope` & `authorizedEntity`, the underlying code now uses the recommended `instanceIDWithHandler` vs `tokenWithAuthorizedEntity`.
  - This fixes an issue where FCM would throw a `"The operation couldn’t be completed"` error ([`#2657`](https://github.com/invertase/react-native-firebase/issues/2657))
- `iOS`: direct FCM connection is now fixed.
  - When the app was in the foreground, `data-only` messages were not coming through, they are now.
- `iOS`: when running debug build, the APNs token will be registered with FCM as a `"sandbox"` key type
- `iOS`: the original APNs swizzling we implemented was not functioning correctly with `application:didReceiveRemoteNotification:fetchCompletionHandler:`.
  - We added additional logic whereby this is executed in all scenarios (foreground/background/quit) and replaces a deprecated Apple API.
  - This fixes issues with `data-only` messages not being handled by the device
- `iOS`: any custom `FIRMessagingDelegate` methods you add to your `AppDelegate.m` will now also be called internally by React Native Firebase messaging.

### Storage

- fixed a bug that occurred when parsing encoded URLs ([`#2753`](https://github.com/invertase/react-native-firebase/issues/2753)) ([`#8e99b9c`](https://github.com/invertase/react-native-firebase/commit/8e99b9cb9093ba0cc3aadcb56127c8500ea8bf36))
- storage tasks now correctly have a `snapshot` property - to match the Web SDK
- `put` method now correctly returns a thenable `Task` instance instead of a promise ([`#ea19622`](https://github.com/invertase/react-native-firebase/commit/ea1962270b6c20d5b15dbaaea5c4d88a0a4ae3e2))

---

## Deprecations

### Messaging

- `registerForRemoteNotifications` has been deprecated in favor of `registerDeviceForRemoteMessages`.
  - It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
- `isRegisteredForRemoteNotifications` has been deprecated in favor of `isDeviceRegisteredForRemoteMessages`.
  - It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
- `unregisterForRemoteNotifications` has been deprecated in favor of `unregisterDeviceForRemoteMessages`.
  - It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. ([`#d66a611`](https://github.com/invertase/react-native-firebase/commit/d66a6118f82005087f53b86571990fc071402153))
