Authentication

Realtime Database

(iOS/Android) Fixed a bug that allows custom firebase::App
instances to be created after the app has been restarted.

Authentication

(Desktop) Changed destruction behavior. Instead of waiting for
all async operations to finish, now Auth will cancel all async operations
and quit. For callbacks that are already running, this will protect against
cases where auth instances might not exist anymore.

(iOS) Fixed an exception in firebase::auth::VerifyPhoneNumber.

(iOS) Stopped Auth from hanging on destruction if any local
futures remain in scope.

Realtime Database

(Desktop) Fixed an issue that could cause a crash when updating
the descendant of a location with a listener attached.

Realtime Database

Dynamic Links

Added a field to received dynamic links describing the strength
of the match.

FCM

Added an optional initialization options struct. This can be
used to suppress the prompt on iOS that requests permission to receive
notifications at start up. Permission can be requested manually using the
function firebase::messaging::RequestPermission().

Invites

Added OnInviteReceived to Listener base class that includes the
strength of the match on the received invite as an enum. Deprecated prior
function that received it as a boolean value.

(Android) Fixed a crash in the Google Play services updater that
occurred when clicking outside of the dialog on Android 4.x devices.

Authentication

Fixed an issue that caused users to be invalidated when a linking
credential fails.

Deprecated the User::refresh_token() method.

FCM

(Android) Resolved an issue which caused an app to receive an
empty message when a notification message is received while the app is in the
background and the user then taps on the app icon rather than on the
notification message.

Invites

(iOS) Fixed an issue which resulted in the app delegate method
application:openURL:sourceApplication:annotation: not being called
when linking the invites library.

Storage

Modified the API so that it's possible to construct metadata
without a storage reference.

Invites

Renamed and deprecated methods that were inconsistent with the
Google C++ Style Guide. Deprecated methods will be removed in a future release
(approximately 2-3 releases from now).

Analytics

Added SetCurrentScreen().

Authentication

Fixed a race condition accessing user data in callbacks.

(Android) Added is_valid() to check if a credential returned by
GetCredential() is valid.

Invites

(Android) Added a Fetch() function to fetch incoming invitations
at times other than application start. You must call this on Android when your
app returns to the foreground (on iOS, this is handled automatically).

(iOS) Fixed regression since 2.1.1 that broke Invites if the
AppDelegate did not implement the open URL method.

FCM

Added a field to firebase::messaging::Message specifying whether
the message was received when the app was in the background.

(Android) Added an AAR file containing the Android manifest
changes needed for receiving notifications. You can add this to your project
instead of modifying the manifest directly.

(iOS) Fixed regression since 2.1.1 that broke FCM on iOS
8 & 9 when an AppDelegate did not implement remote notification methods.

Remote Config

Added support for initializing Remote Config defaults from
firebase::Variant values, including binary data.

App

Added utility functions to check whether Google Play services is
available. See google_play_services::CheckAvailability() and
google_play_services::MakeAvailable() for more information.

App::Create() will no longer check for Google Play services, nor
will it return nullptr. It will always return an App, and the individual
Firebase features will check for Google Play services at initialization if
required.

Analytics

Fixed a crash that occurs when logging string events.

Authentication

firebase::auth::GetAuth() now has an option to return a result
that indicates whether initialization was successful, and to return nullptr
if initialization failed.

Firebase Cloud Messaging

firebase::messaging::Initialize() now returns a result that
indicates whether initialization was successful.

Invites

Note: Dynamic Links uses the Invites SDK.

Added firebase::invites::Initialize(), which you must call once
prior to creating InvitesSender or InvitesReceiver instances. This
function returns a result that indicates whether initialization was
successful.

If you call InvitesReceiver::Fetch() or
InvitesReceiver::ConvertInvitation() without first calling
firebase::invites::Initialize(), the operation will never complete. To work
around this issue, ensure that firebase::invites::Initialize() is called
once before creating any InvitesReceiver instances.

If you create InvitesSender and then InvitesReceiver, the
InvitesReceiver may fail to connect, and be unable to fetch results. To
work around this issue, you can delay creating the InvitesSender until
after the future returned by InvitesReceiver::Fetch() has completed.

Remote Config

firebase::remote_config::Initialize() now returns a result that
indicates whether initialization was successful.

AdMob

firebase::admob::Initialize() now returns a result that
indicates whether initialization was successful.

This update includes a variety of documentation updates and minor bug fixes.
This update primarily fixes bugs in the AdMob portion of the C++ SDK. These
fixes are described below:

Modified firebase::App to check for the required version of Google
Play services on creation to prevent firebase::App creation from failing if
a user's device is out of date. If Google Play services is out of date,
a dialog will prompt the user to install a new version. With the previous
version of this SDK, you needed needed to manually check for an up-to-date
Google Play services SDK using GoogleApiClient.

AdMob

Fixed a potential deadlock when using SetListener from a
notification callback in firebase::admob::InterstitialAd and
firebase::admob::BannerView on iOS.

Fixed a race condition on destruction of admob::BannerView on
Android.

Fixed Future handle leak. An internal memory leak occurred
for objects or modules that use futures for the lifetime of the object or
module. For example, during the lifetime of a BannerView object, each call
to a method which returns a Future could potentially allocate memory which
wouldn't be reclaimed until the BannerView object is destroyed.