Firebase C++ Release Notes

To see release notes for the Firebase console and for other Firebase platforms and related SDKs, see the Firebase Release Notes.

To install this SDK, see Add Firebase to your C++ Project.

Version 5.4.3 - November 30, 2018

Storage

  • (iOS): Fixed an issue when downloading files with GetBytes.

Version 5.4.2 - November 15, 2018

Authentication

  • (Android): Removed an irrelevant error about the Java class FirebaseAuthWebException.

Version 5.4.0 - October 19, 2018

Dynamic Links

  • (Android): Fixed short link generation failing with "error 8".

Realtime Database

  • (Desktop) The Realtime Database Desktop SDK uses REST to access your database. Because of this, you must declare the indexes you use with Query::OrderByChild() on Desktop or your listeners will fail.

Version 5.3.1 - October 3, 2018

Invites

  • (Android) Fixed an exception when the Android Minimum Version code option is used on the Android.

Version 5.3.0 - September 20, 2018

  • (iOS) The minimum supported Xcode version is 9.4.1.

Realtime Database

  • (Desktop) Fixed issues in ChildListener.
  • (Desktop) Fixed crash that could occur if the Database was deleted while an asynchronous operation was still in progress.

functions

  • (Android) Fixed an issue when a function returns an array.

Version 5.2.1 - August 16, 2018

Authentication

  • Fixed a race condition that was returning the wrong Future when you called the same method twice in quick succession.

Realtime Database

  • Fixed a race condition that was returning the wrong Future when you called the same method twice in quick succession.
  • (Desktop) Fixed support for ChildListener when used with Query::EqualTo(), Query::StartAt(), Query::EndAt(), Query::LimitToFirst() and Query::LimitToLast().
  • Fixed a crash in DatabaseReference/Query copy assignment operator and copy constructor.

Version 5.2.0 - July 20, 2018

  • (Android) Fixed a null reference in the Google Play Services availability checker.

Authentication

  • (Android) Fixed a crash in User::UpdatePhoneNumberCredential().

Realtime Database

  • Added a version of GetInstance() that allows passing in the URL of the database to use.

functions

  • Added a way to specify which region to run the function in.

FCM

  • Changed Subscribe() and Unsubscribe() to return a Future.

Version 5.1.1 - June 27, 2018

  • Updated Android and iOS dependency versions only.

Version 5.1.0 - June 22, 2018

Cloud Functions

  • Added support for Cloud Functions on iOS, Android, and desktop.

Analytics

  • Added ResetAnalyticsData() to clear all analytics data for an app from the device.
  • Added GetAppInstanceId() which allows developers to retrieve the current app's analytics instance ID.

Authentication

  • Linking a credential with a provider that has already been linked now produces an error.
  • (iOS) Fixed crashes in User::LinkAndRetrieveDataWithCredential() and User::ReauthenticateAndRetrieveData().
  • (iOS) Fixed photo URL never returning a value on iOS.
  • (Android) Fixed setting profile photo URL with UpdateUserProfile().

Realtime Database

  • Added support for ServerValues in SetPriority() methods.

Version 5.0.0 - June 5, 2018

  • (Android/iOS) Library names have been prefixed with "firebase_", for example libapp.a is now libfirebase_app.a. This brings them in line with the naming scheme used on desktop, and iOS frameworks.
  • (Android) Improved error handling when device is out of space.
  • Removed deprecated accessor methods from Future.

AdMob

  • Removed deprecated accessor methods from BannerView and InterstitialAd.

Authentication

  • Removed deprecated accessors from Auth, Credential, User, and UserInfoInterface, including User::refresh_token().

Realtime Database

  • Removed deprecated accessors from DatabaseReference, Query, DataSnapshot, and MutableData.

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.

Storage

  • Removed deprecated accessors from StorageReference.
  • Removed Metadata::download_url() and Metadata::download_urls(). Please use StorageReference::GetDownloadUrl() instead.

Version 4.5.1 - April 16, 2018

Authentication

  • (Desktop) Added support for accessing user metadata.

Realtime Database

  • (Desktop) Fixed a bug to make creation of database instances with invalid URLs return nullptr.
  • (Desktop) Fixed an issue where incorrect values could be passed to OnChildAdded.

FCM

  • Added the SetAutoTokenRegistrationOnInitEnabled() and IsAutoTokenRegistrationOnInitEnabled() methods to enable or disable auto-token generation.

Remote Config

  • Fixed a bug causing incorrect reporting of success or failure during a Fetch().

Version 4.5.0 - Mar 19, 2018

  • (Desktop) Stub implementations of Authentication, Realtime Database, Remote Config, and Storage have been replaced with functional desktop workflow implementations on Windows, OS X, and Linux.

AdMob

  • Native Express ads have been discontinued, so NativeExpressAdView has been marked deprecated and will be removed in a future version.

Authentication

Realtime Database

  • (Desktop) Stub implementation has been replaced with a functional desktop workflow implementation on Windows, OS X, and Linux.
  • (Desktop) When using Realtime Database on desktop, only one Transaction may be run on a given subtree at the same time.
  • (Desktop) When using Realtime Database on desktop, data persistence is not available.

Remote Config

Storage

  • (Desktop) Stub implementation has been replaced with a functional desktop workflow implementation on Windows, OS X, and Linux.
  • Added MD5 hash to Metadata.
  • Fixed a crash when deleting listeners and other object instances.
  • Controller can now be used from any thread.
  • (iOS) Fixed incorrect content type when uploading.

Version 4.4.3 - Mar 5, 2018

  • (iOS) Removed unresolved symbols in the App library that could cause errors when forcing resolution.

Version 4.4.2 - Feb 23, 2018

  • (Windows) Updated all static libs to suppport different C runtime libraries and correspondingly updated the package directory structure.
  • (Linux) Fixed linking problems with all of the C++ stub libraries.

Dynamic Links

  • (iOS) Now fetches the invite ID when using universal links.
  • (iOS) Fixed crash on failure of dynamic link completion.
  • (iOS) Fixed an issue where some errors weren't correctly reported.

Invites

  • Fixed SendInvite never completing in the stub implementation.

Remote Config

  • Remote Config (iOS) Fixed an issue where some errors weren't correctly reported.

Storage

  • Fixed Metadata::content_language returning the wrong data.
  • (iOS) Reference paths formats are now consistent with other platforms.
  • (iOS) Fixed an issue where trying to upload to a non-existent path would not complete the Future.
  • (iOS) Fixed a crash when a download fails.

Version 4.4.1 - Jan 26, 2018

Realtime Database

  • SetPersistenceEnabled now sets persistence enabled.

Instance ID

  • (iOS) GetToken no longer fails without an APNS certificate, and no longer forces registering for notifications.

Version 4.4.0 - Jan 3, 2018

Instance ID

  • Added Instance ID library.

Version 4.3.0 - Nov 30, 2017

Authentication

  • Added support for accessing user metadata.

Remote Config

  • (Android) Fixed remote_config::ValueSource conversion.

Version 4.2.0 - Oct 2, 2017

Analytics

  • Fixed a bug which prevented the user ID and user properties being cleared.

Authentication

  • Failed operations now return more specific error codes.
  • (iOS) Phone Authentication no longer requires push notifications. When push notifications aren't available, reCAPTCHA verification is used instead.

Realtime Database

  • (Android) Fixed MutableData::children_count().

FCM

  • Messages sent to users can now contain a link URL.
  • (Android) Fixed a bug which prevented the message ID field being set.

Version 4.1.0 - Aug 23, 2017

  • Added std::function support to Future::OnCompletion, to allow use of C++11 lambdas with captures.
  • Futures are now invalidated when their underlying Firebase API is destroyed.
  • Updated to iOS 4.1.0 SDK and Android 11.2.0 SDK.

AdMob

  • (iOS) Fixed a crash if a BannerView is deleted while a call to Destroy() is still pending.

Realtime Database

  • Added a context pointer to DatabaseReference::RunTransaction, as well as std::function support to allow use of C++11 lambdas with captures.
  • DataSnapshot, DatabaseReference, Query, and other objects are invalidated when their Database instance is destroyed.

FCM

  • Added PollableListener to make it easier to poll for messages in an update loop.
  • (Android) Fixed a bug where message_type was not set in the Message struct.
  • (iOS) Fixed a race condition if a message is received before FCM is initialized.
  • (iOS) Fixed a bug detecting whether the notification was opened if the app was running in the background.

Remote Config

  • When listing keys, the list now includes keys with defaults set, even if they were not present in the fetched config.

Storage

  • StorageReference objects are invalidated when their Storage instance is destroyed.

Version 4.0.3 - Aug 1, 2017

  • (iOS) Fixed an issue which resulted in custom options not being applied to firebase::App instances.
  • (iOS) Fixed a bug which caused method implementation look ups to fail when other iOS SDKs rename the selectors of swizzled methods.

Dynamic Links

  • (Android) Fixed future completion if short link creation fails.

FCM

  • (iOS) Fixed message handling when messages they are received via the direct channel to the FCM backend (i.e not via APNS).

Version 4.0.2 - Jul 7, 2017

Analytics

  • Fixed SetCurrentScreen to work from any thread.

Authentication

  • (iOS) Fixed an issue which incorrectly invalidated the current user if credential linking fails.

Dynamic Links

  • Fixed an issue which caused an app to sometimes crash or not receive a Dynamic Link if it's opened when the app is installed and not running.

FCM

  • (iOS) Fixed a crash when no Listener is set.
  • Fixed Listener::OnTokenReceived occasionally being called twice with the same token.

Version 4.0.1 - Jun 16, 2017

FCM

  • (Android): Fixed an issue where Terminate() was not correctly shutting down the FCM library.
  • (iOS): Fixed an issue where library would crash on start up if there was no registration token.

Dynamic Links and Invites

  • (iOS) Fixed an issue which caused an app to not receive a Dynamic Link if it's opened when the app is installed and not running.

Version 4.0.0 - Jun 9, 2017

  • (Android) Fixed crash in some circumstances after resolving dependencies by updating Google Play services.

Authentication

  • Added support for phone number authentication.
  • Added the ability to retrieve user metadata.
  • Moved token notification to a separate listener object.

Dynamic Links

  • Added a standalone library separate from Invites.

Invites

  • (iOS) Fixed an issue in the Analytics SDK's method swizzling which resulted in Dynamic Links / Invites not being sent to the application.

FCM

  • (Android) Fixed a regression introduced in 3.0.3 which caused a crash when opening up a notification when the app is running in the background.
  • (iOS) Fixed interoperation with other users of local notifications.

Version 3.1.2 - May 11, 2017

Authentication

  • Fixed a crash caused by a stale memory reference when a firebase::auth::Auth object is destroyed and then recreated for the same App object.
  • Fixed a potential memory corruption when AuthStateListener is destroyed.

Version 3.1.1 - May 9, 2017

  • (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.

Version 3.1.0 - March 8, 2017

Storage

  • Added an overload for Storage::GetInstance() that accepts a gs://... URL, so you can use Cloud Storage with multiple buckets.

Invites

  • (Android) Fixed an issue where invitations with empty links would fail to be received.

Version 3.0.0 - February 27, 2017

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

Version 2.1.3 - February 6, 2017

  • Fixed a potential deadlock when running callbacks registered via firebase::Future::OnCompletion.

Authentication

  • (Android) Fixed an error in firebase::auth::User::PhotoUri.

FCM

  • (iOS) Removed hard dependency on Xcode 8.
  • (Android) Fixed an issue where the application would receive an empty message on startup.

Version 2.1.2 - January 20, 2017

AdMob

  • (Android) Fixed an issue in firebase::admob::InterstitialAd that caused a crash after displaying multiple interstitial ads.

Version 2.1.1 - January 18, 2017

Authentication

  • (Android) Fixed an issue that caused a future to never complete when signing in while a user is already signed in.

FCM

  • (iOS) Fixed an issue with method swizzling that caused some of the application's UIApplicationDelegate methods to not be called.
  • (iOS) Fixed an issue which caused a crash when initializing the library when building with Xcode 8 for iOS 10.

Invites

  • (iOS) Fixed an issue with method swizzling that caused some of the application's UIApplicationDelegate methods to not be called.

Version 2.1.0 - December 9, 2016

Storage

  • Added a C++ client library for Storage. To get started, see Get Started with Cloud Storage for C++.
  • (Android) Pausing and resuming storage operations will cause the data transfer to fail with the error code kErrorUnknown.

Authentication

  • Added a check for saved user credentials when Authentication is initialized.

Version 2.0.0 - November 7, 2016

AdMob

  • Added support for AdMob Native Express Ads.

Authentication

  • Added the AuthStateListener class that provides notifications when a user is logged in or logged out.

Realtime Database

Invites

Version 1.2.1 - October 3, 2016

Cloud Messaging

  • (Android) Fixed a bug that prevented apps from terminating properly.
  • (iOS) Added missing copy constructor implementation in iOS and stub libraries.

Version 1.2.0 - September 21, 2016

  • (Android) Added firebase::ModuleInitializer, a helper class to initialize Firebase modules and handle any missing dependency on Google Play services.

Cloud Messaging

  • Added firebase::messaging::Notification and associated methods to allow retrieval of the contents of a notification.
  • (iOS) Added support for iOS 10 notifications.
  • (Android) Fixed an issue that caused a crash if Cloud Messaging was initialized before the native library was loaded.

Authentication

  • (Android) Added new API methods, User::SendEmailVerification() and User::EmailVerified() to verify a user's email address.

Remote Config

  • Added GetKeys() and GetKeysByPrefix() methods to allow developers to find parameter keys based on a key prefix.

Invites

  • (iOS) Fixed an issue that could potentially crash an app during shutdown when the InvitesReceiver::Fetch() method is pending.
  • Fixed an issue that occurred when initializing InvitesSender and InvitesReceiver simultaneously.

AdMob

  • Added the Rewarded Video Mediation feature to the C++ SDK. For more information, see the Rewarded Video C++ guide.
  • You can now pass your AdMob App ID to firebase::admob::Initialize() to help reduce latency for the initial ad request.
  • (iOS) You must now call BannerView::Show() to display an ad. Previously, this was only required on Android.
  • Fixed an issue where BannerView::Listener() received an incorrect bounding box.

Version 1.1.0 - August 1, 2016

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

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

Version 1.0.1 - June 27, 2016

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.

发送以下问题的反馈:

此网页
需要帮助?请访问我们的支持页面