v6.4.0
Messaging focused release with features, bug fixes and documentation updates.
Features
iOS
: added aPodfile
option to allow using React Native Firebase packages as static frameworks (#3253
) (#530f8bb
)- see 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
)
- these can be used to detect if a user opened the app via pressing a notification. (
- the
RemoteMessage
event (e.g. viaonMessage
) 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.- see
AuthorizationStatus
reference documentation for available enum members
- see
Bug Fixes
iOS
: updatein-app-messaging
dependency to latest package name in iOSInAppMessaging
(#166692d
)
Analytics
- logging event parameters can be objects and arrays (
#2876
) (#eebfb04
) - update
logEvent
types (#65ec7eb
)
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 matchorderBy
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 fordata-only
,notification-only
&data-notification
messages. Previously it only worked fordata-only
messagessetBackgroundMessageHandler
now works when the app fully quit or backgrounded, fordata-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
- for iOS this requires
- 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 oneiOS
: callingregisterDeviceForRemoteMessages
/registerForRemoteNotifications
was incorrectly causing permissions to be requested before explicitly requesting them via the messaging APIiOS
: 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
- Devices should always register with
iOS
: in cases where requesting an FCM with the defaultscope
&authorizedEntity
, the underlying code now uses the recommendedinstanceIDWithHandler
vstokenWithAuthorizedEntity
.- This fixes an issue where FCM would throw a
"The operation couldn’t be completed"
error (#2657
)
- This fixes an issue where FCM would throw a
iOS
: direct FCM connection is now fixed.- When the app was in the foreground,
data-only
messages were not coming through, they are now.
- When the app was in the foreground,
iOS
: when running debug build, the APNs token will be registered with FCM as a"sandbox"
key typeiOS
: the original APNs swizzling we implemented was not functioning correctly withapplication: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 customFIRMessagingDelegate
methods you add to yourAppDelegate.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 thenableTask
instance instead of a promise (#ea19622
)
Deprecations
Messaging
registerForRemoteNotifications
has been deprecated in favor ofregisterDeviceForRemoteMessages
.- It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. (
#d66a611
)
- It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. (
isRegisteredForRemoteNotifications
has been deprecated in favor ofisDeviceRegisteredForRemoteMessages
.- It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. (
#d66a611
)
- It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. (
unregisterForRemoteNotifications
has been deprecated in favor ofunregisterDeviceForRemoteMessages
.- It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. (
#d66a611
)
- It will be removed in a following major version. Underlying functionality has not changed - renamed to avoid confusion with messages vs notifications. (