{"id":13493847,"url":"https://github.com/firebase/firebase-cpp-sdk","last_synced_at":"2026-03-04T00:28:32.915Z","repository":{"id":37276046,"uuid":"175263313","full_name":"firebase/firebase-cpp-sdk","owner":"firebase","description":"Firebase C++ SDK","archived":false,"fork":false,"pushed_at":"2025-05-12T18:26:45.000Z","size":52716,"stargazers_count":297,"open_issues_count":145,"forks_count":120,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-05-12T19:36:41.104Z","etag":null,"topics":["cpp","firebase","firebase-admob","firebase-analytics","firebase-auth","firebase-authentication","firebase-cloud-functions","firebase-cloud-messaging","firebase-database","firebase-db","firebase-functions","firebase-invite","firebase-realtime-database","firebase-remote-config","firebase-sdk","firebase-storage"],"latest_commit_sha":null,"homepage":"http://firebase.google.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firebase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-12T17:23:01.000Z","updated_at":"2025-05-10T22:29:35.000Z","dependencies_parsed_at":"2023-10-03T01:06:57.463Z","dependency_job_id":"7f55b0df-09d1-4de6-a9c9-6f758f04a4db","html_url":"https://github.com/firebase/firebase-cpp-sdk","commit_stats":{"total_commits":2282,"total_committers":52,"mean_commits":43.88461538461539,"dds":0.6941279579316388,"last_synced_commit":"06ab3ec3f26e63de067f11fa32ee503b05df572c"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Ffirebase-cpp-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Ffirebase-cpp-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Ffirebase-cpp-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firebase%2Ffirebase-cpp-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firebase","download_url":"https://codeload.github.com/firebase/firebase-cpp-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422754,"owners_count":22068678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","firebase","firebase-admob","firebase-analytics","firebase-auth","firebase-authentication","firebase-cloud-functions","firebase-cloud-messaging","firebase-database","firebase-db","firebase-functions","firebase-invite","firebase-realtime-database","firebase-remote-config","firebase-sdk","firebase-storage"],"created_at":"2024-07-31T19:01:19.351Z","updated_at":"2026-01-21T21:13:45.071Z","avatar_url":"https://github.com/firebase.png","language":"C++","readme":"# Firebase C++ Open Source Development\n\nThe repository contains the Firebase C++ SDK source, with support for Android,\niOS, and desktop platforms. It includes the following Firebase libraries:\n\n\u003cimg height=\"200\" align=\"right\" src=\"https://user-images.githubusercontent.com/94545831/196925526-b6f89f3e-0abb-4ea2-842b-371487196463.png\" /\u003e\n\n|||\n|--|--|\n|[Google Analytics for Firebase](https://firebase.google.com/docs/analytics/)|\n|[Firebase Authentication](https://firebase.google.com/docs/auth/)|[Firebase Realtime Database](https://firebase.google.com/docs/database/)|\n|[Cloud Firestore](https://firebase.google.com/docs/firestore/)|\n|[Cloud Functions for Firebase](https://firebase.google.com/docs/functions/)|[Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/)|\n|[Firebase Remote Config](https://firebase.google.com/docs/remote-config/)|[Cloud Storage for Firebase](https://firebase.google.com/docs/storage/)|\n\n\u003cbr\u003e\n\nFirebase is an app development platform with tools to help you build, grow and monetize your app. More information about Firebase can be found [HERE](https://firebase.google.com).\n\n- More information about the Firebase C++ SDK can be found [HERE](https://firebase.google.com/docs/cpp/setup)\n- Samples on how to use the Firebase C++ SDK can be found [HERE](https://github.com/firebase/quickstart-cpp)\n\n\u003cbr\u003e\n\n![Github Repo Size](https://img.shields.io/github/repo-size/firebase/firebase-cpp-sdk?style=for-the-badge\u0026color=aqua)\n\n## Table of Contents\n\n1. [Getting Started](#getting-started)\n1. [Prerequisites](#prerequisites)\n1. [Building](#building)\n1. [Including in Projects](#including-in-projects)\n1. [Contributing Guidelines](https://github.com/firebase/firebase-cpp-sdk/blob/main/CONTRIBUTING.md)\n1. [License](#license)\n\n## Getting Started\nYou can clone the repo with the following command:\n\n``` bash\ngit clone https://github.com/firebase/firebase-cpp-sdk.git\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch2\u003ePrerequisites\u003c/h2\u003e\u003c/summary\u003e\n\nThe following prerequisites are required for all platforms.  Be sure to add any\ndirectories to your PATH as needed.\n\n- [CMake](https://cmake.org/), version 3.7, or newer\n- [Python](https://www.python.org/), version of 3.7, or newer\n- [Abseil-py](https://github.com/abseil/abseil-py)\n\nNote: Once python is installed you can use the following commands to install\nrequired packages:\n\n* python3 -m ensurepip --default-pip\n* python3 -m pip install --user absl-py\n\n### Prerequisites for Desktop\nThe following prerequisites are required when building the libraries for\ndesktop platforms.\n\n- [OpenSSL](https://www.openssl.org/), needed for Realtime Database and Cloud Firestore\n\n### Prerequisites for Windows\nPrebuilt packages for openssl can be found using google and if CMake fails to\nfind the install path use the command line option\n**-DOPENSSL_ROOT_DIR=[Open SSL Dir]**.\n\n### Prerequisites for Mac\nHome brew can be used to install required dependencies:\n\n```bash\nruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\nsource $HOME/.rvm/scripts/rvm\nbrew install cmake python3\nsudo chown -R $(whoami) /usr/local\n```\n\n### Prerequisites for Android\nThe following prerequisites are required when building the libraries for\nAndroid.\n\n- Android SDK, Android NDK, and CMake for Android (version 3.10.2 recommended)\n  - Download sdkmanager (either independently, or as a part of Android Studio)\n    [here](https://developer.android.com/studio/#downloads)\n  - Follow [these instructions](https://developer.android.com/studio/projects/add-native-code.html#download-ndk)\n    to install the necessary build tools\n- (Windows only) [Strings (from Microsoft Sysinternals)](https://docs.microsoft.com/en-us/sysinternals/downloads/strings)\n  \u003e **Important - Strings EULA** \\\n  \u003e You will have to run Strings once from the command line to accept the\n    EULA before it will work as part of the build process.\n\nNote that we include the Gradle wrapper, which if used will acquire the\nnecessary version of Gradle for you.\n\n### Prerequisites for iOS/tvOS\nThe following prerequisites are required when building the libraries for iOS or tvOS.\n- [Cocoapods](https://cocoapods.org/)\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch2\u003eBuilding\u003c/h2\u003e\u003c/summary\u003e\n\n### Building with CMake\nThe build uses CMake to generate the necessary build files, and supports out of\nsource builds.\nThe CMake following targets are available to build and link with:\n\n| Feature | CMake Target |\n| ------- | ------------ |\n| App (base library) | firebase_app |\n| Google Analytics for Firebase | firebase_analytics |\n| Firebase Authentication | firebase_auth |\n| Firebase Realtime Database | firebase_database |\n| Cloud Firestore | firebase_firestore |\n| Cloud Functions for Firebase | firebase_functions |\n| Firebase Cloud Messaging | firebase_messaging |\n| Firebase Remote Config | firebase_remote_config |\n| Cloud Storage for Firebase | firebase_storage |\n\nFor example, to build the Analytics library, you could run the following\ncommands:\n\n``` bash\nmkdir desktop_build \u0026\u0026 cd desktop_build\ncmake ..\ncmake --build . --target firebase_analytics\n```\n\nNote that you can provide a different generator on the configure step, for\nexample to generate a project for Visual Studio 2017, you could run:\n\n``` bash\ncmake -G “Visual Studio 15 2017” ..\n```\n\nMore information on generators can be found at\n\u003chttps://cmake.org/cmake/help/latest/manual/cmake-generators.7.html\u003e.\n\nBy default, when building the SDK, the CMake process will download any third\nparty dependencies that are needed for the build. This logic is in\n[cmake/external_rules.cmake](/cmake/external_rules.cmake), and the accompanying\n[cmake/external/CMakeLists.txt](/cmake/external/CMakeLists.txt). If you would\nlike to provide your own directory for these dependencies, you can override\n`[[dependency_name]]_SOURCE_DIR` and `[[dependency_name]]_BINARY_DIR`. If the\nbinary directory is not provided, it defaults to the given source directory,\nappended with `-build`.\n\nFor example, to provide a custom flatbuffer directory you could run:\n\n``` bash\ncmake -DFLATBUFFERS_SOURCE_DIR=/tmp/flatbuffers ..\n```\n\nAnd the binary directory would automatically be set to `/tmp/flatbuffers-build`.\n\nCurrently, the third party libraries that can be provided this way are:\n\n| Library |\n| ------- |\n| CURL |\n| FLATBUFFERS |\n| LIBUV |\n| NANOPB |\n| UWEBSOCKETS |\n| ZLIB |\n\n#### Building with CMake for iOS\nThe Firebase C++ SDK comes with a CMake config file to build the library for\niOS platforms, [cmake/toolchains/ios.cmake](/cmake/toolchains/ios.cmake).  In\norder to build with it, when running the CMake configuration pass it in with\nthe CMAKE_TOOLCHAIN_FILE definition.  For example, to build the Auth\nlibrary for iOS, you could run the following commands:\n\n``` bash\nmkdir ios_build \u0026\u0026 cd ios_build\ncmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/ios.cmake ..\ncmake --build . --target firebase_auth\n```\n\n#### Building with CMake for tvOS\nThe Firebase C++ SDK comes with a CMake config file to build the library for\ntvOS platforms, [cmake/toolchains/apple.toolchain.cmake](/cmake/toolchains/apple.toolchain.cmake).  In\norder to build with it, when running the CMake configuration pass it in with\nthe CMAKE_TOOLCHAIN_FILE definition.  For example, to build the Auth\nlibrary for tvOS, you could run the following commands:\n\n``` bash\nmkdir tvos_build \u0026\u0026 cd tvos_build\ncmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/apple.toolchain.cmake -DPLATFORM=TVOS ..\ncmake --build . --target firebase_auth\n```\n\n#### Building XCFrameworks for both iOS and tvOS\nThe Firebase C++ SDK comes with a helper Python script to build XCFrameworks\nthat work for both iOS and tvOS. This is helpful as we can use the same\ndeliverable for both iOS and tvOS targets in the same XCode project.\n\n``` bash\n# Install prereqs (like cocoapods)\n./build_scripts/tvos/install_prereqs.sh\npython3 scripts/gha/build_ios_tvos.py -s . -b ios_tvos_build\n```\n\n\n### Building with Gradle for Android\nWhen building the Firebase C++ SDK for Android, gradle is used in combination\nwith CMake when producing the libraries.  Each Firebase feature is its own\ngradle subproject off of the root directory. The gradle target to build the\nrelease version of each Firebase library is:\n\n| Feature | Gradle Target |\n| ------- | ------------- |\n| App (base library) | :app:assembleRelease |\n| Google Analytics for Firebase | :analytics:assembleRelease |\n| Firebase Authentication | :auth:assembleRelease |\n| Firebase Realtime Database | :database:assembleRelease |\n| Cloud Firestore | :firestore:assembleRelease |\n| Cloud Functions for Firebase | :functions:assembleRelease |\n| Firebase Cloud Messaging | :messaging:assembleRelease |\n| Firebase Remote Config | :remote_config:assembleRelease |\n| Cloud Storage for Firebase | :storage:assembleRelease |\n\nFor example, to build the release version of the Analytics library, you could\nrun the following from the root directory:\n\n``` bash\n./gradlew :analytics:assembleRelease\n```\n\n#### Proguard File Generation\nNote that as part of the build process, each library generates a proguard file\nthat should be included in your application.  The generated file is located in\neach library’s build directory.  For example, the Analytics proguard file would\nbe generated to `analytics/build/analytics.pro`.\n\n\u003c/details\u003e\n\n## Testing\nEach Firebase SDK in this repo includes a series of unit tests. These tests are\nbuilt and executed by the CI system in order to validate changes and pull\nrequests.\n\nThe provided `test_windows_x32.bat`, `test_windows_x64.bat`,\n`test_linux.sh` and `test_mac_x64.sh` scripts build the SDKs and execute\nthe unit tests via **ctest** on Windows32, Windows64, Linux and MacOS hosts,\nrespectively.  These scripts reside in the base directory of the repository.\n\n### Known Issues\n- Mac \n  - When executing tests you may be requested to unlock your Mac OS keychain.\n    Please enter your keychain password and select **Always Allow**. If you\n    still encounter repeated access request dialogs then you must unlock the\n    keychain manually otherwise some tests will fail.\n      - Open the **Keychain access** application on your Mac.\n      - Under **Keychains** (upper left) select the **login** keychain.\n      - Under **Category** select **Passwords** as a category (lower left) and\n        find the entry **not_a_real_project_id.{hashcode}**.  Right click it.\n      - Select **Get Info**, select **Access Control** and enable the \n        **Allow all applications to access this item** radio button.\n      - Re-run the tests.\n\n\u003cdetails\u003e\u003csummary\u003e\u003ch2\u003eIncluding in Projects\u003c/h2\u003e\u003c/summary\u003e\n\n### Including in CMake Projects\nIncluding the Firebase C++ SDK to another CMake project is fairly\nstraightforward.  In the CMakeLists.txt file that wants to include the Firebase\nC++ SDK, you can use\n[add_subdirectory](https://cmake.org/cmake/help/latest/command/add_subdirectory.html),\nproviding the location of the cloned repository.  For example, to add\nAnalytics, you could add the following to your CMakeLists.txt file:\n\n``` cmake\nadd_subdirectory( [[Path to the Firebase C++ SDK]] )\ntarget_link_libraries( [[Your CMake Target]] firebase_analytics firebase_app)\n```\n\nAdditional examples of how to do this for each library are available in the\n[C++ Quickstarts](https://github.com/firebase/quickstart-cpp).\n\n### Including in Android Gradle Projects\nIn order to link the Firebase C++ SDK with your gradle project, in addition to\nthe CMake instructions above, you can use\n[Android/firebase_dependencies.gradle](/Android/firebase_dependencies.gradle)\nto link the libraries, their dependencies, and the generated proguard files. For\nexample, to add Analytics, you could add the following to your build.gradle\nfile:\n\n``` gradle\napply from: “[[Path to the Firebase C++ SDK]]/Android/firebase_dependencies.gradle”\nfirebaseCpp.dependencies {\n  analytics\n}\n```\n\nAdditional examples of how to do this for each library are available in the\n[C++ Quickstarts](https://github.com/firebase/quickstart-cpp).\n\n\u003c/details\u003e\n\n## License\nThe contents of this repository is licensed under the\n[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nYour use of Firebase is governed by the\n[Terms of Service for Firebase Services](https://firebase.google.com/terms/).\n\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebase%2Ffirebase-cpp-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirebase%2Ffirebase-cpp-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirebase%2Ffirebase-cpp-sdk/lists"}