Jump to top

v6.4.0

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) (#530f8bb)

Messaging

  • added support for onNotificationOpenedApp & getInitialNotification APIs.
    • these can be used to detect if a user opened the app via pressing a notification. (#d66a611)
  • the RemoteMessage event (e.g. via onMessage) now includes a notification payload (if present). (#d66a611)
  • setBackgroundMessageHandler now supported on iOS. (#d66a611)
  • 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)
  • the requestPermission & hasPermission APIs now returns the current authorization status as an enum, rather than a boolean value.

Bug Fixes

  • iOS: update in-app-messaging dependency to latest package name in iOS InAppMessaging (#166692d)

Analytics

Authentication

  • user.metadata.lastSignInTime & user.metadata.creationTime now correctly return an ISO date string (#2555) (#8adef65)

Dynamic Links

  • switch ShortLinkType interface to an enum (#870d0a1)
  • fix links options not correctly applied in iOS (#54bc6f8)
  • fix missing return statement causing bug in iOS (#3315) (#1661f6e)

Firestore

  • improve Firestore query validation;
  • where field parameter cannot match orderBy parameter (#6311dc8)
  • field path cannot be used with a orderBy parameter (#ea19622)

Functions

  • correctly throw an UNAVAILABLE error code on network IO errors for Android to match iOS (#3310) (#7351147)

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, irregardless 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)
  • 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) (#8e99b9c)
  • 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)

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)
  • 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)
  • 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)