CINXE.COM
Get started with Cloud Firestore | Firebase
<!doctype html> <html lang="en" dir="ltr"> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("https://firebase.google.com/docs/firestore/quickstart","20210226045348","https://web.archive.org/","web","/_static/", "1614315228"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email"> <meta property="og:site_name" content="Firebase"> <meta property="og:type" content="website"> <meta name="theme-color" content="#039be5"> <meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/web/20210226045348/https://firebase.google.com/_pwa/firebase/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//web.archive.org/web/20210226045348/https://www.gstatic.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20210226045348/https://fonts.gstatic.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20210226045348/https://fonts.googleapis.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20210226045348/https://apis.google.com/" crossorigin> <link rel="preconnect" href="//web.archive.org/web/20210226045348/https://www.google-analytics.com/" crossorigin> <link rel="stylesheet" href="//web.archive.org/web/20210226045348cs_/https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700|Material+Icons"> <link rel="stylesheet" href="https://web.archive.org/web/20210226045348cs_/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/css/app.css"> <noscript> </noscript> <link rel="shortcut icon" href="https://web.archive.org/web/20210226045348im_/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/favicon.png"> <link rel="apple-touch-icon" href="https://web.archive.org/web/20210226045348im_/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/touchicon-180.png"><link rel="canonical" href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/firestore/quickstart"><link rel="search" type="application/opensearchdescription+xml" title="Firebase" href="https://web.archive.org/web/20210226045348/https://firebase.google.com/s/opensearch.xml"> <title>Get started with Cloud Firestore | Firebase</title> <meta property="og:title" content="Get started with Cloud Firestore | Firebase"> <meta property="og:url" content="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/firestore/quickstart"> <meta property="og:locale" content="en"> <meta name="gtm_var" data-key="docType" data-value="other"> </head> <body type="article" theme="firebase-theme" class="" layout="docs" pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"><devsite-header> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="/web/20210226045348/https://firebase.google.com/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="firebase" track-metadata-position="nav" track-metadata-eventdetail="nav"> <img src="https://web.archive.org/web/20210226045348im_/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/lockup.png" class="devsite-site-logo" alt="Firebase"> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list"> <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab dropdown> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/products-build" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="products" aria-haspopup="true" aria-expanded="false" data-category="Site-Wide Custom Events" data-label="Tab: Products"> Products </a> <a href="#" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu" role="button" track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="products" data-category="Site-Wide Custom Events" data-label="Tab: Products" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column "> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-item"> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/products-build" track-type="navMenu" track-name="Build" track-metadata-position="nav" track-metadata-href="https://firebase.google.com/products-build" tooltip> <div class="devsite-nav-item-title"> Build </div> </a> </li> <li class="devsite-nav-item"> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/products-release" track-type="navMenu" track-name="Release & Monitor" track-metadata-position="nav" track-metadata-href="https://firebase.google.com/products-release" tooltip> <div class="devsite-nav-item-title"> Release & Monitor </div> </a> </li> <li class="devsite-nav-item"> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/products-engage" track-type="navMenu" track-name="Engage" track-metadata-position="nav" track-metadata-href="https://firebase.google.com/products-engage" tooltip> <div class="devsite-nav-item-title"> Engage </div> </a> </li> </ul> </div> </div> </div> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/use-cases" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="useCases" data-category="Site-Wide Custom Events" data-label="Tab: Use Cases"> Use Cases </a> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/pricing" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="pricing" data-category="Site-Wide Custom Events" data-label="Tab: Pricing"> Pricing </a> </tab> <tab active> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="docs" aria-label="Docs, selected" data-category="Site-Wide Custom Events" data-label="Tab: Docs"> Docs </a> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/community" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="community" data-category="Site-Wide Custom Events" data-label="Tab: Community"> Community </a> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/support" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="support" data-category="Site-Wide Custom Events" data-label="Tab: Support"> Support </a> </tab> </nav> </devsite-tabs> </div> <devsite-search aria-expanded="false" aria-haspopup="listbox" enable-signin enable-search enable-suggestions enable-query-completion project-name="Firebase" tenant-name="Firebase" role="combobox"> <form class="devsite-search-form" action="https://web.archive.org/web/20210226045348/https://firebase.google.com/s/results" method="GET"> <div class="devsite-search-container"> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-haspopup="false" aria-multiline="false" aria-label="Search box" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" type="text" value=""> <div class="devsite-search-image material-icons" aria-hidden="true"></div> </div> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-language-selector> <devsite-select class="devsite-language-selector-menu"> <select aria-label="Select your language preference." class="devsite-language-selector-select" name="language" track-name="click" track-type="languageSelector"> <option>Language</option> <option value="en" lang="en" track-metadata-original-language="en" track-metadata-selected-language="en" track-name="changed" track-type="languageSelector"> English </option> <option value="id" lang="id" track-metadata-original-language="en" track-metadata-selected-language="id" track-name="changed" track-type="languageSelector"> Bahasa Indonesia </option> <option value="de" lang="de" track-metadata-original-language="en" track-metadata-selected-language="de" track-name="changed" track-type="languageSelector"> Deutsch </option> <option value="es_419" lang="es_419" track-metadata-original-language="en" track-metadata-selected-language="es_419" track-name="changed" track-type="languageSelector"> Español – América Latina </option> <option value="fr" lang="fr" track-metadata-original-language="en" track-metadata-selected-language="fr" track-name="changed" track-type="languageSelector"> Français </option> <option value="it" lang="it" track-metadata-original-language="en" track-metadata-selected-language="it" track-name="changed" track-type="languageSelector"> Italiano </option> <option value="pl" lang="pl" track-metadata-original-language="en" track-metadata-selected-language="pl" track-name="changed" track-type="languageSelector"> Polski </option> <option value="pt_br" lang="pt_br" track-metadata-original-language="en" track-metadata-selected-language="pt_br" track-name="changed" track-type="languageSelector"> Português – Brasil </option> <option value="vi" lang="vi" track-metadata-original-language="en" track-metadata-selected-language="vi" track-name="changed" track-type="languageSelector"> Tiếng Việt </option> <option value="tr" lang="tr" track-metadata-original-language="en" track-metadata-selected-language="tr" track-name="changed" track-type="languageSelector"> Türkçe </option> <option value="ru" lang="ru" track-metadata-original-language="en" track-metadata-selected-language="ru" track-name="changed" track-type="languageSelector"> Русский </option> <option value="he" lang="he" track-metadata-original-language="en" track-metadata-selected-language="he" track-name="changed" track-type="languageSelector"> עברית' </option> <option value="ar" lang="ar" track-metadata-original-language="en" track-metadata-selected-language="ar" track-name="changed" track-type="languageSelector"> العربيّة </option> <option value="fa" lang="fa" track-metadata-original-language="en" track-metadata-selected-language="fa" track-name="changed" track-type="languageSelector"> فارسی </option> <option value="hi" lang="hi" track-metadata-original-language="en" track-metadata-selected-language="hi" track-name="changed" track-type="languageSelector"> हिंदी </option> <option value="bn" lang="bn" track-metadata-original-language="en" track-metadata-selected-language="bn" track-name="changed" track-type="languageSelector"> বাংলা </option> <option value="th" lang="th" track-metadata-original-language="en" track-metadata-selected-language="th" track-name="changed" track-type="languageSelector"> ภาษาไทย </option> <option value="zh_cn" lang="zh_cn" track-metadata-original-language="en" track-metadata-selected-language="zh_cn" track-name="changed" track-type="languageSelector"> 中文 – 简体 </option> <option value="zh_tw" lang="zh_tw" track-metadata-original-language="en" track-metadata-selected-language="zh_tw" track-name="changed" track-type="languageSelector"> 中文 – 繁體 </option> <option value="ja" lang="ja" track-metadata-original-language="en" track-metadata-selected-language="ja" track-name="changed" track-type="languageSelector"> 日本語 </option> <option value="ko" lang="ko" track-metadata-original-language="en" track-metadata-selected-language="ko" track-name="changed" track-type="languageSelector"> 한국어 </option> </select> </devsite-select> </devsite-language-selector> <a class="devsite-header-link devsite-top-button button gc-analytics-event" href="//web.archive.org/web/20210226045348/https://console.firebase.google.com/" data-category="Site-Wide Custom Events" data-label="Site header link"> Go to console </a> <devsite-user enable-profiles fp-auth id="devsite-user"></devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-product-id-row"> <div class="devsite-product-description-row"> <ul class="devsite-breadcrumb-list"> <li class="devsite-breadcrumb-item "> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail=""> Documentation </a> </li> </ul> </div> </div> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="overview" data-category="Site-Wide Custom Events" data-label="Tab: Overview"> Overview </a> </tab> <tab active> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/guides" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="guides" aria-label="Guides, selected" data-category="Site-Wide Custom Events" data-label="Tab: Guides"> Guides </a> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/reference" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="reference" data-category="Site-Wide Custom Events" data-label="Tab: Reference"> Reference </a> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/samples" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="samples" data-category="Site-Wide Custom Events" data-label="Tab: Samples"> Samples </a> </tab> <tab> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/libraries" class="gc-analytics-event " track-type="globalNav" track-metadata-position="nav" track-metadata-eventdetail="nav" track-name="libraries" data-category="Site-Wide Custom Events" data-label="Tab: Libraries"> Libraries </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="/web/20210226045348/https://firebase.google.com/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="firebase" track-metadata-position="nav" track-metadata-eventdetail="nav"> <img src="https://web.archive.org/web/20210226045348im_/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/lockup.png" class="devsite-site-logo" alt="Firebase"> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list"> <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/products-build" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Products" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="products"> <span class="devsite-nav-text" tooltip> Products </span> <span class="devsite-nav-icon material-icons" data-icon="forward"> </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip> <span class="devsite-nav-text" tooltip menu="Products"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Products"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/use-cases" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Use Cases" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="useCases"> <span class="devsite-nav-text" tooltip> Use Cases </span> <span class="devsite-nav-icon material-icons" data-icon="forward"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/pricing" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Pricing" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="pricing"> <span class="devsite-nav-text" tooltip> Pricing </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/docs" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Docs" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="docs"> <span class="devsite-nav-text" tooltip> Docs </span> </a> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/docs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="overview"> <span class="devsite-nav-text" tooltip> Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/guides" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Guides" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="guides"> <span class="devsite-nav-text" tooltip menu="_book"> Guides </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/reference" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Reference" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="reference"> <span class="devsite-nav-text" tooltip> Reference </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/samples" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="samples"> <span class="devsite-nav-text" tooltip> Samples </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/libraries" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Libraries" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="libraries"> <span class="devsite-nav-text" tooltip> Libraries </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/community" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Community" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="community"> <span class="devsite-nav-text" tooltip> Community </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/support" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Support" track-type="globalNav" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="support"> <span class="devsite-nav-text" tooltip> Support </span> </a> </li> <li class="devsite-nav-item"> <a href="//web.archive.org/web/20210226045348/https://console.firebase.google.com/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Go to console" track-type="navMenu" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="goToConsole"> <span class="devsite-nav-text" tooltip> Go to console </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom" role="navigation"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/guides" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Guides</span></a></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Get started with Firebase</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Add Firebase to an app</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ios/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/android/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/web/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Web</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Add Firebase to a game</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/games/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cpp/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>C++</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/unity/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Unity</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admin/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Add Firebase to a server</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Use Firebase with a framework</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/flutter/setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Flutter</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/api/workflow_set-up-and-manage-project" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up projects programmatically</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Manage your Firebase projects</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/learn-more" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understand Firebase projects</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/locations" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Select locations for your project</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/multiprojects" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Configure multiple projects</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/api-keys" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Learn about API keys for Firebase</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/pwa" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Firebase in PWAs</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/bigquery-export" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Export project data to BigQuery</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/manage-installations" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Firebase installations</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/import-segments" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Import segments</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Manage projects programmatically</span></div></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/api/workflow_set-up-and-manage-project" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use the REST API</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Use the Admin SDK</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/admin/node/admin.projectManagement" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Node.js</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/admin/java/reference/com/google/firebase/projectmanagement/package-summary" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Java</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/admin/python/firebase_admin.project_management" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Python</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/provisioning/configure-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Configure OAuth identity providers for Firebase Auth</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Manage project access (IAM)</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/overview" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Roles</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles-basic" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Owner, Editor, Viewer roles</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Firebase predefined roles</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles-predefined" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles-predefined-all-products" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Firebase-level roles</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles-predefined-category" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Product-category roles</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles-predefined-product" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Product-level roles</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/roles-custom" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Custom roles</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/projects/iam/permissions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Permissions</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Platforms and frameworks</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>iOS</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ios/link-firebase-static-dynamic" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Firebase dependencies statically or dynamically</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ios/app-store-data-collection" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Prepare for Apple App Store data disclosure requirements</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ios/prepare-for-ios-14" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Prepare for iOS 14</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Android</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/android/learn-more" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Learn about Android + Firebase</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/android/android-play-services" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Dependencies of Firebase Android SDKs on Google Play services</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/android/integrate-play-games" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Integrate with your Play Games Services project</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Web</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/web/learn-more" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Learn about Web + Firebase</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/web/environments-js-sdk" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Supported environments for the Firebase JS SDK</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion devsite-nav-beta"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Prototype and test with Emulator Suite</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Connect your app and prototype</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite/connect_and_prototype" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite/connect_auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Connect to the Authentication emulator</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite/connect_rtdb" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Connect to the Realtime Database emulator</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite/connect_firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Connect to the Cloud Firestore emulator</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite/connect_functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Connect to the Cloud Functions emulator</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/emulator-suite/install_and_configure" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Install, configure and integrate</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Analytics</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Log Events</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/user-properties" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set User Properties</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/debugview" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Debug Events</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/screenviews" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Track Screens</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/userid" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set a User ID</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/measure-ecommerce" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Measure Ecommerce</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/webview" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use in a WebView</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/extend-with-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Extend with Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/configure-data-collection" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Configure Data Collection and Usage</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Error Codes</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/cpp/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/cpp/events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Log Events</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/cpp/properties" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set User Properties</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/unity/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/unity/events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Log Events</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/analytics/unity/properties" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set User Properties</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion devsite-nav-beta"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Extensions</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/extensions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Use an extension in your project</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/extensions/overview-use-extensions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/extensions/install-extensions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Install an extension</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/extensions/manage-installed-extensions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage installed extensions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/extensions/permissions-granted-to-extension" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Permissions granted to an extension</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-divider devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Build</span></div></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Authentication</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/where-to-start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Where do I start?</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Users in Firebase Projects</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/firebaseui" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with a pre-built UI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/manage-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/password-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Password Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/email-link-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Email Link Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/google-signin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Google Sign-In</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/facebook-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Facebook Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/apple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with Apple</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/twitter-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Twitter Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/github-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>GitHub</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/microsoft-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Microsoft</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/yahoo-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Yahoo</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/game-center" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Game Center Sign-in</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/phone-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Phone Number</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/custom-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use a Custom Auth System</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/anonymous-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Anonymous Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/single-sign-on" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Enabling cross-app authentication with shared iOS Keychain</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/account-linking" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Multiple Auth Providers</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/passing-state-in-email-actions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Passing State in Email Actions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/ios/errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handle Errors</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/firebaseui" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with a pre-built UI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started with the Firebase SDK</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/manage-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/password-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Password Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/email-link-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Email Link Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/google-signin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Google Sign-In</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/facebook-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Facebook Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/apple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with Apple</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/twitter-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Twitter</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/github-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>GitHub</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/microsoft-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Microsoft</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/yahoo-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Yahoo</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/play-games" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Play Games Sign-in</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/phone-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Phone Number</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/custom-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use a Custom Auth System</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/anonymous-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Anonymous Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/account-linking" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Multiple Auth Providers</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/android/passing-state-in-email-actions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Passing State in Email Actions</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Web</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/firebaseui" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with a pre-built UI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/manage-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/password-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Password Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/email-link-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Email Link Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/google-signin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Google Sign-In</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/facebook-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Facebook Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/apple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with Apple</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/twitter-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Twitter</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/github-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>GitHub</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/microsoft-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Microsoft</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/yahoo-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Yahoo</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/phone-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Phone Number</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/custom-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use a Custom Auth System</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/anonymous-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Anonymous Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/account-linking" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Multiple Auth Providers</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/cordova" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>OAuth Sign-In for Cordova</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/auth-state-persistence" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Auth State Persistence</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/passing-state-in-email-actions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Passing State in Email Actions</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/web/service-worker-sessions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Service Worker Sessions</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/manage-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/password-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Password Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/google-signin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Google Sign-in</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/play-games" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Play Games Sign-in</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/github-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>GitHub</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/facebook-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Facebook Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/apple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with Apple</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/twitter-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Twitter Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/microsoft-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Microsoft</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/yahoo-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Yahoo</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/phone-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Phone Number</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/custom-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use a Custom Auth System</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/anonymous-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Anonymous Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/cpp/account-linking" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Multiple Auth Providers</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/manage-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/password-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Password Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/google-signin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Google Sign-in</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/play-games" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Play Games Sign-in</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/github-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>GitHub Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/facebook-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Facebook Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/apple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sign in with Apple</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/twitter-login" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Twitter Login</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/microsoft-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Microsoft</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/yahoo-oauth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Yahoo</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/phone-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Phone Number</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/custom-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use a Custom Auth System</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/anonymous-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Anonymous Authentication</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/unity/account-linking" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Multiple Auth Providers</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Admin</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/manage-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/import-users" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Import Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/create-custom-tokens" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create Custom Tokens</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/verify-id-tokens" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Verify ID Tokens</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/manage-sessions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage User Sessions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/manage-cookies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Session Cookies</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/custom-claims" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Control Access with Custom Claims</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/email-action-links" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Generating Email Action Links</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/admin/errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Errors</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admin/migrate-admin" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Migration Guide</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/custom-email-handler" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Customize the Email Action Handler</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/extend-with-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Extend with Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/case-studies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Case Studies</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/auth/limits" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Usage Limits</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Realtime Database</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rtdb-vs-firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Choose a Database</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/ios/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/ios/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/ios/read-and-write" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Read and Write Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/ios/lists-of-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Work with Lists of Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/ios/offline-capabilities" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Enable Offline Capabilities</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/android/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/android/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/android/read-and-write" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Read and Write Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/android/lists-of-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Work with Lists of Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/android/offline-capabilities" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Enable Offline Capabilities</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Web</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/web/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/web/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/web/read-and-write" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Read and Write Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/web/lists-of-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Work with Lists of Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/web/offline-capabilities" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Enable Offline Capabilities</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Admin</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/admin/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/admin/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/admin/save-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Save Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/admin/retrieve-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Retrieve Data</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>REST</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rest/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rest/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rest/save-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Save Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rest/retrieve-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Retrieve Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rest/auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Authenticate REST Requests</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/cpp/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/cpp/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/cpp/save-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Save Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/cpp/retrieve-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Retrieve Data</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/unity/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/unity/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/unity/save-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Save Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/unity/retrieve-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Retrieve Data</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Security & Rules</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/security" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understand Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/security/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/security/core-syntax" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/security/rules-conditions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Write Conditions for Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/security/indexing-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Index Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/rest/app-management" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Rules via REST</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Usage and Performance</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/billing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understand Billing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/limits" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Realtime Database Limits</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/monitor-usage" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Monitor Database Usage</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/monitor-performance" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Monitor Database Performance</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/sharding" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Scale with Multiple Databases</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/profile" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Profile Your Database</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/usage/optimize" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Optimize Database Performance</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/backups" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Automated Backups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/extend-with-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Extend with Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/database/video-series" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Video series: Firebase for SQL Developers</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Cloud Firestore</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/quickstart" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Understand Cloud Firestore</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/rtdb-vs-firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Compare Cloud Firestore and Realtime Database</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/data-model" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Data model</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/data-types" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Data types</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/client/libraries" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>SDKs and client libraries</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/index-overview" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Index types</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/locations" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Database locations</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Add and manage data</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/structure-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/add-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Add data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/transactions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Transactions and batched writes</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/transaction-data-contention" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Data contention in transaction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/delete-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/using-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage Cloud Firestore with the Firebase Console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/export-import" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Export and import data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/move-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Move data between projects</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Read data</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/get-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get data once</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/listen" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Listen for realtime updates</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/queries" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Perform simple and compound queries</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/order-limit-data" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Order and limit data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/query-cursors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Paginate data with query cursors</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/enable-offline" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Access data offline</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/indexing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage indexes</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Secure and validate data</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/overview" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/rules-structure" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/rules-conditions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Writing conditions for Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/insecure-rules" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Fix insecure rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/test-rules-emulator" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test your Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/rules-query" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Securely query data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/rules-fields" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Control access per field</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Solutions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/aggregation" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Aggregation Queries</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/counters" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Distributed counters</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/search" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Full-text search</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/presence" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Build presence</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/role-based-access" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Secure data access for users and groups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/delete-collections" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete data with a callable Cloud Function</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/schedule-export" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Schedule data exports</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/shard-timestamp" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sharded timestamps</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/geoqueries" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Geo queries</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/automate-database-create" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Automating database creation</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/solutions/index-map-field" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Reduce index costs with map fields</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Usage, limits, and pricing</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/quotas" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Usage and limits</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/monitor-usage" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Monitor usage</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/pricing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understand Cloud Firestore billing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/billing-example" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Example Cloud Firestore costs</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/storage-size" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understand storage size calculations</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/best-practices" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Best practices for Cloud Firestore</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Cloud Firestore integrations</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/use-rest-api" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use the Cloud Firestore REST API</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/firestore-for-rtdb" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Cloud Firestore and Realtime Database</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/extend-with-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Extend with Cloud Functions</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/library-integrations" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Third-party library integrations</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>API reference</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/package-summary" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/swift/firebasefirestore/api/reference/Classes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS — Swift</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/ios/firebasefirestore/api/reference/Classes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS — Objective-C</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/js/firebase.firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Web</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/functions/providers_firestore_" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="//web.archive.org/web/20210226045348/https://googleapis.dev/nodejs/firestore/latest/" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Node.js</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/admin/java/reference/com/google/firebase/cloud/FirestoreClient" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Java</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/admin/python/firebase_admin.firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Python</span></a></li><li class="devsite-nav-item"><a href="//web.archive.org/web/20210226045348/https://godoc.org/cloud.google.com/go/firestore" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Go</span></a></li><li class="devsite-nav-item"><a href="//web.archive.org/web/20210226045348/https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Firestore/" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>C#</span></a></li><li class="devsite-nav-item"><a href="//web.archive.org/web/20210226045348/https://googleapis.github.io/google-cloud-php/#/docs/cloud-firestore/latest/firestore/readme" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>PHP</span></a></li><li class="devsite-nav-item"><a href="//web.archive.org/web/20210226045348/https://googleapis.github.io/google-cloud-ruby/docs/google-cloud-firestore/latest/Google/Firestore/V1beta1" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Ruby</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/reference/rest" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>REST</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/reference/rpc" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>RPC</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Samples</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/client/samples-ios" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/client/samples-android" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/client/samples-web" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Web</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Cloud Storage</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/create-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create a Reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/upload-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upload Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/download-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Download Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/file-metadata" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use File Metadata</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/delete-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/list-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>List Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/ios/handle-errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handle Errors</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/create-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create a Reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/upload-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upload Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/download-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Download Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/file-metadata" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use File Metadata</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/delete-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/list-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>List Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/android/handle-errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handle Errors</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Web</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/create-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create a Reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/upload-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upload Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/download-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Download Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/file-metadata" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use File Metadata</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/delete-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/list-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>List Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/web/handle-errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handle Errors</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Admin</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/admin/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/create-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create a Reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/upload-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upload Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/download-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Download Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/file-metadata" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use File Metadata</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/delete-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/cpp/handle-errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handle Errors</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/create-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create a Reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/upload-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upload Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/download-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Download Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/file-metadata" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use File Metadata</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/delete-files" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Delete Files</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/unity/handle-errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handle Errors</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Security & Rules</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/security" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understand Security</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/security/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/security/core-syntax" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Structure Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/security/rules-conditions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Write Conditions for Security Rules</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/monitor-storage" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Monitor activity</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/extend-with-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Extend with Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/storage/gcp-integration" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Integrate with Google Cloud</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Hosting</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/use-cases" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>What can you do with Firebase Hosting?</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/quickstart" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item devsite-nav-new"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/test-preview-deploy" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test, preview, then deploy</span><span class="devsite-nav-icon material-icons" data-icon="new" data-title="New!" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-new"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/github-integration" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Deploy via GitHub pull requests</span><span class="devsite-nav-icon material-icons" data-icon="new" data-title="New!" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/multisites" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Share project resources across multiple sites</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/custom-domain" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Connect a custom domain</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/full-config" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Configure hosting behavior</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/i18n-rewrites" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Configure i18n rewrites</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/reserved-urls" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Add SDKs using reserved URLs</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Serve dynamic content and host microservices</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/serverless-overview" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Cloud Functions for Firebase</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/cloud-run" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Cloud Run</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/manage-cache" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage cache behavior</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/manage-hosting-resources" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage live & preview channels, releases, and versions</span></a></li><li class="devsite-nav-item devsite-nav-new"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/web-request-logs-and-metrics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Monitor web request data with Cloud Logging</span><span class="devsite-nav-icon material-icons" data-icon="new" data-title="New!" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/usage-quotas-pricing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Usage, quotas, and pricing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/hosting/api-deploy" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Deploy using the REST API</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Cloud Functions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/use-cases" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>What can I do with Cloud Functions?</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/beta-v1-diff" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upgrade to v1.0+ from beta</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Call functions directly</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/callable" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Call functions from your app</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/http-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Call functions via HTTP requests</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/schedule-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run functions on a schedule</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Trigger background functions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/firestore-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Cloud Firestore triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/database-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Realtime Database triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/rc-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Remote Config triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/auth-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Authentication triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/analytics-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Analytics triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/gcp-storage-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Cloud Storage triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/pubsub-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Pub/Sub triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/test-lab-events" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test Lab triggers</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Write functions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/manage-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage deployment and runtime options</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/typescript" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Write functions in TypeScript</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/terminate-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Sync, async, and promises</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/retries" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Retry asynchronous functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/config-env" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Environment configuration</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/organize-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Organize functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/handle-dependencies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Handling dependencies</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/networking" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Optimizing networking</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/tips" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Tips & tricks</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Test functions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/local-emulator" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run functions locally</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/unit-testing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Unit testing functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/local-shell" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test functions interactively</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Monitor functions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/writing-and-viewing-logs" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Write and view logs</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/reporting-errors" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Report errors</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/monitored-metrics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>View monitored metrics</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>API Reference</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Firebase SDK for Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/functions/test" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test SDK</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/callable-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Protocol specification for https.onCall</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/video-series" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Video Series: learn Cloud Functions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/functions-and-firebase" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Cloud Functions and Firebase</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/locations" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Cloud Functions locations</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/functions/quotas" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Quotas and limits</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion devsite-nav-beta"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Machine Learning</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/codelabs" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Codelabs</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Custom Models</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Use a custom model</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/use-custom-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/use-custom-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/use-custom-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/manage-hosted-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Deploy & manage custom models</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Migrate from the legacy API</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/migrate-from-legacy-api" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/migrate-from-legacy-api" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Cloud AutoML Vision Edge</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/automl-image-labeling" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/train-image-labeler" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Train image labeling models</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Label images with your models</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/label-images-with-automl" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/label-images-with-automl" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/train-object-detector" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Train object detection models</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Detect objects with your models</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/detect-objects-with-automl" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/detect-objects-with-automl" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/migrate-automl-datasets" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Migrate datasets</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Use Cloud Vision APIs</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Recognize text</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/recognize-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/recognize-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/recognize-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Label images</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/label-images" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/label-images" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/label-images" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Recognize landmarks</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/recognize-landmarks" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/recognize-landmarks" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/recognize-landmarks" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Deprecated Vision SDKs</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Recognize text</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/recognize-text-deprecated" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/recognize-text-deprecated" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Label images</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/label-images-deprecated" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/label-images-deprecated" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Recognize landmarks</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/recognize-landmarks-deprecated" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/recognize-landmarks-deprecated" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Advanced Topics</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>A/B test two versions of a model</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/ab-test-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/ab-test-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Prepare for Production</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Protect your Cloud credentials</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/ios/secure-api-key" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml/android/secure-api-key" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Legacy Documentation</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>ML Kit for Firebase</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Vision</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Recognize text</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/recognize-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/recognize-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/recognize-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Detect faces</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/detect-faces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/face-detection-concepts" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Concepts</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/detect-faces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/detect-faces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Scan barcodes</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/read-barcodes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/read-barcodes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/read-barcodes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Label images</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/label-images" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/label-images" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/label-images" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Detect and track objects</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/object-detection" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/detect-objects" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/detect-objects" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Recognize landmarks</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/recognize-landmarks" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/recognize-landmarks" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/recognize-landmarks" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>AutoML Vision Edge</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/automl-image-labeling" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/train-image-labeler" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Train image labeling models</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Label images with your models</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/label-images-with-automl" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/label-images-with-automl" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/migrate-automl-datasets" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Migrate datasets</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Natural Language</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Identify the language of text</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/identify-languages" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/identify-languages" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/identify-languages" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Translate text</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/translation" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/translate-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/translate-text" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/translation-terms" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Usage guidelines</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Generate smart replies</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/generate-smart-replies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/generate-smart-replies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/generate-smart-replies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Custom Models</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Use a custom model</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/use-custom-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/use-custom-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/use-custom-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/manage-hosted-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage hosted custom models</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Use a custom TensorFlow Lite build</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/use-custom-tflite" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/use-custom-tflite" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Advanced Topics</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>A/B test two versions of a model</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/ab-test-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/ab-test-models" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Prepare for Production</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Reduce app package size</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/reduce-app-size" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Protect your Cloud credentials</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/ios/secure-api-key" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ml-kit/android/secure-api-key" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Security Rules</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Understand Security Rules</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/rules-language" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Security Rules language</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/rules-behavior" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>How Security Rules work</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/rules-and-auth" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Security Rules and Firebase Authentication</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Write Security Rules</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/basics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Basic Security Rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/insecure-rules" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Avoid insecure rules</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/data-validation" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Data validation</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Test Security Rules</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/emulator-setup" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up the emulator</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/unit-tests" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Build unit tests</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/emulator-reports" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Generate test reports</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/simulator" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Quickly validate Security Rules</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/rules/manage-deploy" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage and deploy Security Rules</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-divider devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Release & Monitor</span></div></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Crashlytics</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/upgrade-sdk" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Upgrade from Fabric (legacy)</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/start-using-analytics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get metrics with Google Analytics</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/test-implementation" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test your implementation</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/customize-crash-reports" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Customize crash reports</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get deobfuscated crash reports</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/ndk-reports" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Android NDK crash reports</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/velocity-alerts" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Customize velocity alerts</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/bigquery-export" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Export data to BigQuery</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/crashlytics/troubleshooting" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Troubleshooting</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Performance Monitoring</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Get started</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/get-started-ios" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/get-started-android" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/get-started-web" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Web</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Learn about automatically collected data</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/app-start-foreground-background-traces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>App start, foreground, background (iOS & Android)</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/screen-traces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Screen rendering (iOS & Android)</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/page-load-traces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Page loading (web)</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/network-traces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>HTTP/S network requests</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Customize data collection and aggregation</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/custom-code-traces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Add monitoring for specific code</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/custom-network-traces" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Add monitoring for specific network requests</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/custom-url-patterns" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create custom URL patterns</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/disable-sdk" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Disable Performance Monitoring</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Track, view, and filter data</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview of the console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/attributes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Filter data using attributes</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/issue-management" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>View performance issues</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/bigquery-export" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Export data to BigQuery</span></a></li><li class="devsite-nav-item devsite-nav-break"></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/perf-mon/troubleshooting" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Troubleshooting & FAQ</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Test Lab</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/run-game-loop-test" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run a Game Loop test</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/run-xctest" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run an XCTest</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/firebase-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with the Firebase console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/command-line" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with the gcloud CLI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/test-locally" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test locally</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/available-testing-devices" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test on available devices</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/ios/analyzing-results" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Analyze test results</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/instrumentation-test" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run an instrumentation test</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/robo-ux-test" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run a Robo test</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/game-loop" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Run a Game Loop test</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/firebase-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with the Firebase console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/command-line" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with the gcloud CLI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/android-studio" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with Android Studio</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/available-testing-devices" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test on available devices</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/test-screenshots" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Take screenshots in a test</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/avds" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with virtual devices</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/analyzing-results" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Analyze test results</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-new"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/troubleshooting" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Troubleshooting</span><span class="devsite-nav-icon material-icons" data-icon="new" data-title="New!" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-new"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/usage-quotas-pricing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Usage, quotas, & pricing</span><span class="devsite-nav-icon material-icons" data-icon="new" data-title="New!" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/android/continuous" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test with CI systems</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/extend-with-functions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Extend with Cloud Functions</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>REST API reference</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/reference/testing/rest" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Testing (submit test & monitor)</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/test-lab/reference/toolresults/rest" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>ToolResults (retrieve results)</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion devsite-nav-beta"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>App Distribution</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/manage-testers" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage testers</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/troubleshooting" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Troubleshooting</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Set up for testers</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/ios/set-up-for-testing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/android/set-up-for-testing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Distribute iOS apps</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/ios/distribute-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use the Firebase console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/ios/distribute-cli" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use the Firebase CLI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/ios/distribute-fastlane" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use fastlane</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/set-up-alerts" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up in-app alerts</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Distribute Android apps</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/android/distribute-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use the Firebase console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/android/distribute-cli" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use the Firebase CLI</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/android/distribute-fastlane" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use fastlane</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-distribution/android/distribute-gradle" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Gradle</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-divider devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Engage</span></div></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Predictions</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/predefined-predictions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Churn and spend predictions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/bigquery-export" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Export prediction data to BigQuery</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Use case examples</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/use-cases/prevent-churn" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Prevent churn</span></a></li><li class="devsite-nav-item devsite-nav-break"></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Legacy Predictions (deprecated)</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/v1" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/v1/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Use Cases</span></div></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/use-cases/prevent-churn" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Prevent Churn</span></a></li><li class="devsite-nav-item devsite-nav-break"></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/v1/explore-predictions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Explore Prediction Results</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/v1/bigquery-export" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Export Prediction Data to BigQuery</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/v1/predefined-predictions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Churn and Spend Predictions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/predictions/v1/risk-profiles" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Risk Tolerance and Model Performance</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion devsite-nav-beta"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>A/B Testing</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ab-testing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ab-testing/abtest-config" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create Remote Config Experiments with A/B Testing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ab-testing/abtest-with-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create Messaging Experiments with A/B Testing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ab-testing/abtest-inappmessaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Create In-App Messaging Experiments with A/B Testing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ab-testing/video-series" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Video Series: Learn A/B Testing</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Cloud Messaging</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/fcm-architecture" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>FCM Architectural Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/concept-options" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>About FCM messages</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/client" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up an iOS client</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/certs" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Configuring APNs with FCM</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/first-message" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send a test message</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/send-multiple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to multiple devices</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/send-image" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send an image in the notification payload</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Receive messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/topic-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to topics</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/device-group" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send to device groups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/ios/send-with-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages with the Firebase Console</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/client" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up an Android client</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/first-message" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send a test message</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/send-multiple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to multiple devices</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/send-image" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send an image in the notification payload</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Receive messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/topic-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to topics</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/device-group" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send to device groups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/upstream" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send upstream messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/android/send-with-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages with the Firebase Console</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/cpp/client" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up a C++ client</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/cpp/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Receive messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/cpp/topic-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to topics</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/cpp/device-group" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send to device groups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/cpp/upstream" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send upstream messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/cpp/send-with-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages with the Firebase Console</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/unity/client" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up a Unity client</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/unity/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Receive messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/unity/topic-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to topics</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/unity/device-group" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send to device groups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/unity/upstream" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send upstream messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/unity/send-with-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages with the Firebase Console</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Web (JavaScript)</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/client" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Set up a JavaScript client</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/first-message" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send a test message</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/send-multiple" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to multiple devices</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Receive messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/topic-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages to topics</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/device-group" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send to device groups</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/send-with-console" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Send messages with the Firebase Console</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/js/case-studies" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Case studies</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Server environments</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/server" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Your server environment and FCM</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/migrate-v1" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Migrate to the HTTP v1 API</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/auth-server" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Authorize send requests</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/send-message" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Build send requests</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/receive-upstream" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Receive upstream messages</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/manage-topics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manage topics from the server</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/cloud-messaging/understand-delivery" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Understanding message delivery</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion devsite-nav-beta"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>In-App Messaging</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/in-app-messaging" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/in-app-messaging/get-started" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/in-app-messaging/explore-use-cases" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Explore use cases</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/in-app-messaging/compose-campaign" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Compose a campaign</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/in-app-messaging/modify-message-behavior" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Modify message behavior</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/in-app-messaging/customize-messages" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Customize messages</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Remote Config</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>What can I do with Remote Config?</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/use-cases" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Remote Config use cases</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Key concepts and strategies</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/parameters" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Parameters and conditions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/templates" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Templates and versioning</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/loading" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Config loading strategies</span></a></li><li class="devsite-nav-item devsite-nav-beta"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/propagate-updates-realtime" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Propagate updates in real time</span><span class="devsite-nav-icon material-icons" data-icon="beta" data-title="Beta" aria-hidden="true"></span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/config-analytics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Remote Config and Analytics</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/use-config-ios" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started with Remote Config on iOS</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/use-config-android" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started with Remote Config on Android</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Web (JavaScript)</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/use-config-web" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started with Remote Config on Web</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/use-config-cpp" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Remote Config with C++</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/use-config-unity" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Remote Config with Unity</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/automate-rc" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Modify Remote Config programmatically</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>API reference</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/remote-config/rest" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>REST API reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/remote-config/condition-reference" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Conditional expression reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/android/com/google/firebase/remoteconfig/package-summary" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android SDK reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/swift/firebaseremoteconfig/api/reference/Classes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS Swift SDK reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/ios/firebasecore/api/reference/Classes" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS Obj-C SDK reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/unity/namespace/firebase/remote-config" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Unity reference</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/reference/cpp/namespace/firebase/remote-config" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>C++ reference</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Dynamic Links</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Use Cases</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/use-cases" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/use-cases/web-to-app" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Convert Web Users To App Users</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/use-cases/user-to-user" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Invite Users to Your App</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/use-cases/rewarded-referral" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Reward User Referrals</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/operating-system-integrations" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Operating System Integrations</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Create Dynamic Links</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/create-links" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/ios/create" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/android/create" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/cpp/create" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>C++</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/unity/create" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Unity</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/rest" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>REST</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/create-manually" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Manual URL Construction</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Receive Dynamic Links</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/ios/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/android/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/cpp/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>C++</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/unity/receive" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Unity</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/custom-domains" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use a Custom Domain</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/analytics" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>View Analytics Data</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/debug" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Debug Dynamic Links</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/dynamic-links/link-previews" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Link Previews & Social Metadata</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Google AdMob</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob/ios/quick-start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started for iOS</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob/android/quick-start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started for Android</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob/analytics-and-firebase" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Use Analytics and Firebase with AdMob apps</span></a></li><li class="devsite-nav-item devsite-nav-heading"><div class="devsite-nav-title devsite-nav-title-no-path"><span class="devsite-nav-text" tooltip>Use AdMob in a game</span></div></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>C++</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob/cpp/quick-start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob/cpp/cocos2d-x" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Cocos2d-x</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/admob/cpp/rewarded-video" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Rewarded video</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Unity</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item devsite-nav-external"><a href="//web.archive.org/web/20210226045348/https://developers.google.com/admob/unity/start" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get started</span><span class="devsite-nav-icon material-icons" data-icon="external" data-title="External" aria-hidden="true"></span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Google Ads</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/ads" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li></ul></devsite-expandable-nav></li> <li class="devsite-nav-item devsite-nav-expandable devsite-nav-accordion"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>App Indexing</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Introduction</span></a></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>iOS</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/ios/app" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/ios/test" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test Your Implementation</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/ios/measure" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Enhance Search Performance</span></a></li></ul></devsite-expandable-nav></li><li class="devsite-nav-item devsite-nav-expandable"><devsite-expandable-nav collapsed> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"><span class="devsite-nav-text" tooltip>Android</span></div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/android/app" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Get Started</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/android/public-content" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Refine Public Content Indexing</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/android/log-actions" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Log User Actions</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/android/test" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Test Your Implementation</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/android/measure" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Enhance Search Performance</span></a></li><li class="devsite-nav-item"><a href="/web/20210226045348/https://firebase.google.com/docs/app-indexing/android/migrate" class="devsite-nav-title"><span class="devsite-nav-text" tooltip>Migrate to the Latest API</span></a></li></ul></devsite-expandable-nav></li></ul></devsite-expandable-nav></li> </ul> <ul class="devsite-nav-list" menu="Products" aria-label="Side menu" hidden> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/products-build" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Build" track-type="navMenu" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="build"> <span class="devsite-nav-text" tooltip> Build </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/products-release" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Release & Monitor" track-type="navMenu" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="release&Monitor"> <span class="devsite-nav-text" tooltip> Release & Monitor </span> </a> </li> <li class="devsite-nav-item"> <a href="/web/20210226045348/https://firebase.google.com/products-engage" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Engage" track-type="navMenu" track-metadata-eventdetail="globalMenu" track-metadata-position="nav" track-name="engage"> <span class="devsite-nav-text" tooltip> Engage </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav has-toc> <devsite-toc class="devsite-nav"></devsite-toc> <devsite-content> <article class="devsite-article"><style> /* Styles inlined from /styles/docs.css */ .center { text-align: center } /* Used in AdMob code examples */ .oldcode { opacity: .40; /* IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); /* IE <= 7 */ filter:alpha(opacity=40); } .newcode { font-weight: bold; } /* Device Screenshots */ .deviceshot { max-width: 700px; max-height: 400px; } /* Start Changelog styles */ .badge { position: relative; top: -3px; border-radius: 16px; display: inline-block; width: 90px; height: 32px; line-height: 32px; margin-right: 10px; text-transform: uppercase; font-size: 13px; font-weight: 700; text-align: center; } /* Colours for each type of changelog entry. */ /* TODO: Change the colours to match the site colour scheme */ .badge-changed { background-color: #F4B400; color: #fff; } .badge-fixed { background-color: #4285F4; color: #fff; } .badge-important { background-color: #DB4437; color: #fff; } .badge-feature { background-color: #0F9D58; color: #fff; } .badge-deprecated { background-color: #DB4437; color: #fff; } .badge-issue { background-color: #DB4437; color: #fff; } .changelog > ul { padding-left: 0; } .changelog > ul > li { list-style-type: none; margin-bottom: 22px; } .firebase-support-release-page .changelog > ul { list-style-type: none; padding-left: 110px; } .release-changed::before, .release-feature::before, .release-fixed::before, .release-issue::before, .release-deprecated::before, .release-removed::before, .release-unchanged::before, .release-rules::before, .release-android::before, .release-android-bom::before, .release-ios::before, .release-admin::before, .release-cpp::before, .release-unity::before, .release-functions::before, .release-javascript::before { display: block; float: left; color: white; width: 100px; height: 32px; margin-left: -110px; margin-right: 10px; margin-top: -5px; padding-top: 4px; text-transform: uppercase; font-size: 13px; font-weight: 700; text-align: center; border-radius: 16px; } .release-changed::before { content: "changed"; background-color: #F4B400; } .release-feature::before { content: "feature"; background-color: #0F9D58; } .release-fixed::before { content: "fixed"; background-color: #4285F4; } .release-issue::before { content: "issue"; background-color: #DB4437; } .release-deprecated::before { content: "deprecated"; background-color: #E65100; } .release-removed::before { content: "removed"; background-color: #546E7A; } .release-unchanged::before { content: "no change"; background-color: #CCCCCC; } .release-android::before { content: "android"; background-color: #A4C639; } .release-android-bom::before { content: "android bom"; background-color: #A4C639; } .release-ios::before { text-transform: none; content: "iOS"; background-color: #007aff; } .release-admin::before { content: "admin"; background-color: #039BE5; } .release-cpp::before { content: "c++"; background-color: #FF8A65; } .release-unity::before { content: "unity"; background-color: #00cccc; } .release-functions::before { content: "functions"; background-color: #2C384A; } .release-javascript::before { content: "javascript"; background-color: #7e57c2; } .release-rules::before { content: "rules"; background-color: #1B3A57; } /* End Changelog styles */ /* Docs Overview page styles */ .docs-android, .docs-ios, .docs-web, .docs-cpp, .docs-unity { height: 64px; width: 64px; margin: 10px 16px 0 -16px; } .firebase-docs-overview .devsite-landing-row h2 { margin: 80px 0 -40px; } .devsite-landing-row-3-up .docs-landing-row-item { width: calc((100% - 80px)/2); display: inline-block; } .docs-landing-icon { font-size: 48px; height: 48px; margin: 11px; width: 48px; } .firebase-reference-list { display: -ms-flex; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; list-style: none; margin: 0 0 40px; padding: 0; } .firebase-reference-list-item { -ms-flex: 0 0 50%; flex: 0 0 50%; margin: 40px 0 0; padding: 0; } .firebase-reference-list-item > a { -ms-flex-align: center; align-items: center; display: -ms-flex; display: flex; } .firebase-reference-list-item > a:not(:hover) h3 { color: #424242; } .firebase-reference-list-item > a:not(:hover) li, .firebase-reference-list-item > a:not(:hover) p { color: #757575; } .firebase-reference-list-item .docs-landing-icon { -ms-flex-align: center; align-items: center; background-color: #f5f5f5; border-radius: 50%; -ms-flex: 0 0 88px; flex: 0 0 88px; height: 88px; -ms-justify-content: center; justify-content: center; margin: 0 16px 0 0; padding: 20px; } .firebase-reference-list-item h3 { -ms-flex: 0 0 auto; flex: 0 0 auto; font-size: 18px; line-height: 28px; margin: 0; } .firebase-reference-list-item ul { list-style: none; padding: 0; } .docs-android, .docs-ios, .docs-web, .docs-cpp, .docs-unity { height: 88px; width: auto; } .firebase-reference-list-item.docs-android .docs-landing-icon { color: #00bfa5; } .firebase-reference-list-item.docs-cpp .docs-landing-icon { color: #fd8c09; } .firebase-reference-list-item.docs-ios .docs-landing-icon { color: #16aaca; } .firebase-reference-list-item.docs-unity .docs-landing-icon { color: #000000; } .firebase-reference-list-item.docs-web .docs-landing-icon { color: #c52062; } .firebase-reference-list-item.docs-http .docs-landing-icon { color: #3F51B5; } @media (max-width: 1000px) { .firebase-reference-list { -ms-flex-direction: column; flex-direction: column; } } /* end Docs Overview page styles */ /* Full-page platform selector for Crashlytics docs */ /* Note: h3 in selector content must include hide-from-toc */ .full-page-selector, .full-page-selector-content { border: none; font-size: inherit; } .full-page-selector > .kd-buttonbar { margin: 32px 0px; } .full-page-selector > section { display: none; } .full-page-selector-content > .selected { padding: 0; font-size: inherit; } .full-page-selector-content > .kd-buttonbar { display: none; } .select-page { display: none; } .select-page + .ds-selector-tabs, .after-selection ~ .ds-selector-tabs { border: none; font-size: inherit; } .select-page + .ds-selector-tabs > .kd-buttonbar { margin: 32px 0px; } .select-page + .ds-selector-tabs > section { display: none; } .after-selection ~ .ds-selector-tabs > .selected { padding: 0; font-size: inherit; } .after-selection ~ .ds-selector-tabs > section p { line-height: 24px; } .after-selection ~ .ds-selector-tabs > .kd-buttonbar { display: none; } /* End full-page platform selector */ /* Custom beta and alpha indicators (v1 format, followed by v2 format) */ .devsite-nav-alpha .devsite-nav-icon::before, .devsite-nav-icon[data-icon="alpha"]::before { content: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTMuMjA2IDE1YTU0LjIxNCA1NC4yMTQgMCAwIDEtLjkyLTIuNTc4bC0uMTQtLjQxNGE4MS43NiA4MS43NiAwIDAgMC0uMTM2LS40MDJDMTAuODUgMTMuNjcyIDkuNTYyIDE0LjUgNy41IDE0LjUgNC44MSAxNC41IDMgMTIuNjE2IDMgOXMxLjgxLTUuNSA0LjUtNS41YzIuMDYyIDAgMy4zNS44MjggNC41MSAyLjg5NGwuMTM3LS40MDIuMTM5LS40MTRjLjM4LTEuMTI3LjY1My0xLjkwMi45Mi0yLjU3OGgyLjE2NmMtLjM2NC44My0uNjcyIDEuNjgtMS4xOSAzLjIxN2wtLjE0LjQxM0E1Ny45OSA1Ny45OSAwIDAgMSAxMy4xOTQgOWMuMjc1LjcxLjU1NCAxLjQ5OC44NDggMi4zN2wuMTQuNDEzYy41MTggMS41MzguODI2IDIuMzg3IDEuMTkgMy4yMTdoLTIuMTY2ek03LjUgNS41QzUuOTMyIDUuNSA1IDYuNDcgNSA5YzAgMi41My45MzIgMy41IDIuNSAzLjUgMS40OTcgMCAyLjQ0NC0uOTE3IDMuNTM1LTMuNUM5Ljk0NCA2LjQxNyA4Ljk5NyA1LjUgNy41IDUuNXoiIGZpbGw9InJnYmEoMCwwLDAsLjM4KSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+'); } .devsite-nav-beta .devsite-nav-icon::before, .devsite-nav-icon[data-icon="beta"]::before { content: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTIuMjM2IDcuNjgzQTQgNCAwIDAgMSAxMCAxNUg3djJINVY0YTIgMiAwIDAgMSAyLTJoMi41YTMuNSAzLjUgMCAwIDEgMi43MzYgNS42ODN6TTcgMTNoM2EyIDIgMCAxIDAgMC00SDd2NHptMC02aDIuNWExLjUgMS41IDAgMCAwIDAtM0g3djN6IiBmaWxsPSJyZ2JhKDAsMCwwLC4zOCkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg=='); } .firebase-platform-label { font: 500 12px/24px Roboto,sans-serif; } /* Full-page platform selector dropdown */ /* Note: use menu variables in _elements.html file */ .full-page-selector-dropdown { border: none; position: relative; float: left; display: inline-block; } .full-page-selector-dropdown > .ds-selector-tabs { display: none; position: absolute; min-width: 160px; z-index: 1; } .full-page-selector-dropdown:hover .ds-selector-tabs { display: block; margin: 0; } .full-page-selector-dropdown:hover .kd-tabbutton { display: block; border: none; height: inherit; text-align: left; } .full-page-selector-dropdown:hover .kd-buttonbar { border: none; height: inherit; } .full-page-selector-dropdown h3:hover { color: white; background-color: #039be5; } .full-page-selector-dropdown:hover .devsite-overflow-menu-button { display: none; } </style> <div class="devsite-banner devsite-banner-announcement"> <div class="devsite-banner-message"> <div class="devsite-banner-message-text"> <style> .devsite-banner-announcement:not(.devsite-banner-tenant) { background: #202124; color: white; font-weight: 500; } .devsite-banner-announcement a { color: white; font-weight: 700; } .devsite-banner-announcement a:link, .devsite-banner-announcement a:visited { background: 0; } .devsite-banner-announcement a:hover, .devsite-banner-announcement a:focus { text-decoration: none; } .devsite-banner-announcement .devsite-banner-message-text { margin: 0 auto; } </style> Google is committed to advancing racial equity for Black communities. <a href="https://web.archive.org/web/20210226045348/https://google.com/racialequity" class="gc-analytics-event" data-category="Announcement" data-label="Racial Equity">See how.</a> </div> </div> </div> <div class="devsite-article-meta" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Firebase"> Firebase </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail=""> Docs </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/guides" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail=""> Guides </a> </li> </ul> <devsite-page-rating position="header" selected-rating="0" hover-rating-star="0"> </devsite-page-rating> </div> <devsite-feedback position="header" project-name="Firebase" product-id="719752" bucket="" context="" version="t-devsite-webserver-20210216-r02-rc00.433188149613609970" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="header" project-feedback-url="https://firebase.google.com/support/contact/bugs-features/" project-icon="https://firebase.google.com/_static/firebase/images/logo.png" project-support-url="https://firebase.google.com/support/" feedback-type="star-rating"> <button> Send feedback </button> </devsite-feedback> <h1 class="devsite-page-title">Get started with Cloud Firestore</h1> <devsite-toc class="devsite-nav" devsite-toc-embedded> </devsite-toc> <div class="devsite-article-body clearfix "> <p>This quickstart shows you how to set up Cloud Firestore, add data, then view the data you just added in the Firebase console.</p> <h2 id="create" data-text="Create a Cloud Firestore database">Create a Cloud Firestore database</h2> <ol> <li><p>If you haven't already, create a Firebase project: In the <a href="//web.archive.org/web/20210226045348/https://console.firebase.google.com/">Firebase console</a>, click <strong>Add project</strong>, then follow the on-screen instructions to create a Firebase project or to add Firebase services to an existing GCP project.</p></li> <li><p>Navigate to the <strong>Cloud Firestore</strong> section of the <a href="https://web.archive.org/web/20210226045348/https://console.firebase.google.com/project/_/firestore" class="gc-analytics-event" data-category="firebasedb_test_0220" data-label="console_firestore_creation_event_test_0220">Firebase console</a>. You'll be prompted to select an existing Firebase project. Follow the database creation workflow.</p></li> <li><p>Select a starting mode for your Cloud Firestore Security Rules:</p> <dl> <dt>Test mode</dt> <dd><p>Good for getting started with the mobile and web client libraries, but allows anyone to read and overwrite your data. After testing, <strong>make sure to review the <a href="#secure_your_data">Secure your data</a> section.</strong></p></dd> <dd><p>To get started with the web, iOS, or Android SDK, select test mode.</p></dd> <dt>Locked mode</dt> <dd><p>Denies all reads and writes from mobile and web clients. Your authenticated application servers (C#, Go, Java, Node.js, PHP, Python, or Ruby) can still access your database.</p></dd> <dd><p>To get started with the C#, Go, Java, Node.js, PHP, Python, or Ruby server client library, select locked mode.</p></dd> </dl></li> <li><p>Select a <a href="/web/20210226045348/https://firebase.google.com/docs/firestore/locations#types">location</a> for your database.</p> <ul> <li><p>This location setting is your project's <a href="/web/20210226045348/https://firebase.google.com/docs/firestore/locations#default-cloud-location"><em>default Google Cloud Platform (GCP) resource location</em></a>. Note that this location will be used for GCP services in your project that require a location setting, specifically, your default <a href="/web/20210226045348/https://firebase.google.com/docs/storage">Cloud Storage</a> bucket and your <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/appengine/docs/">App Engine</a> app (which is required if you use Cloud Scheduler).</p></li> <li><p>If you aren't able to select a location, then your project already has a default GCP resource location. It was set either during project creation or when setting up another service that requires a location setting.</p></li> </ul> <aside class="warning"><strong>Warning:</strong><span> After you set your project's default GCP resource location, you cannot change it.</span></aside></li> <li><p>Click <strong>Done</strong>.</p></li> </ol> <aside class="note"> <strong>Cloud Firestore and App Engine:</strong> You can't use both Cloud Firestore and Cloud Datastore in the same project, which might affect apps using App Engine. Try using Cloud Firestore with a different project. </aside> <p>When you enable Cloud Firestore, it also enables the API in the <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/projectselector/apis/api/firestore.googleapis.com/overview">Cloud API Manager</a>.</p> <h2 id="set_up_your_development_environment" data-text="Set up your development environment">Set up your development environment</h2> <p>Add the required dependencies and client libraries to your app.</p> <div class="ds-selector-tabs" data-ds-scope="lang"> <section> <h5 id="web" data-text="Web">Web</h5> <ol> <li>Follow the instructions to <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/web/setup">add Firebase to your Web app</a>. </li> <li>Add the Firebase and Cloud Firestore libraries to your app: <pre class="prettyprint" translate="no" dir="ltr"> <script src="https://www.gstatic.com/firebasejs/8.2.9/firebase-app.js"></script> <script src="https://www.gstatic.com/firebasejs/8.2.9/firebase-firestore.js"></script></pre> The Cloud Firestore SDK is also available as an npm package. <pre class="prettyprint" translate="no" dir="ltr"> npm install firebase@8.2.9 --save </pre> You'll need to manually require both Firebase and Cloud Firestore. <pre class="prettyprint" translate="no" dir="ltr"> const firebase = require("firebase"); // Required for side-effects require("firebase/firestore"); </pre> </li> </ol> </section> <section> <h5 id="ios" data-text="iOS">iOS</h5> <ol> <li>Follow the instructions to <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/ios/setup">add Firebase to your iOS app</a>.</li> <li>Add the Cloud Firestore pod to your <code translate="no" dir="ltr">Podfile</code> <pre class="prettyprint" translate="no" dir="ltr"> pod 'Firebase/Firestore' # Optionally, include the Swift extensions if you're using Swift. pod 'FirebaseFirestoreSwift' </pre> </li> <li>Save the file and run <code translate="no" dir="ltr">pod install</code>.</li> </ol> </section> <section> <h3 id="java" data-text="Java"><span class="two-line-tab"><span tab-label="Android">Java</span></span></h3> <ol> <li>Follow the instructions to <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/android/setup">add Firebase to your Android app</a>.</li> <li>Using the <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/android/learn-more#bom">Firebase Android BoM</a>, declare the dependency for the Cloud Firestore Android library in your <b>module (app-level) Gradle file</b> (usually <code translate="no" dir="ltr">app/build.gradle</code>). <pre class="prettyprint" translate="no" dir="ltr"> dependencies { <strong>// Import the BoM for the Firebase platform implementation platform('com.google.firebase:firebase-bom:26.5.0')</strong> <strong>// Declare the dependency for the Cloud Firestore library</strong> // When using the BoM, you don't specify versions in Firebase library dependencies <strong>implementation 'com.google.firebase:firebase-firestore'</strong> } </pre> <p>By using the <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/android/learn-more#bom">Firebase Android BoM</a>, your app will always use compatible versions of the Firebase Android libraries. </p> <div> <devsite-expandable> <p class="showalways"><em>(Alternative)</em> Declare Firebase library dependencies <em>without</em> using the BoM </p> <p>If you choose not to use the Firebase BoM, you must specify each Firebase library version in its dependency line. </p> <p><strong>Note that if you use <em>multiple</em> Firebase libraries in your app, we highly recommend using the BoM to manage library versions, which ensures that all versions are compatible.</strong> </p> <pre class="prettyprint" translate="no" dir="ltr"> dependencies { <strong>// Declare the dependency for the Cloud Firestore library</strong> // When NOT using the BoM, you must specify versions in Firebase library dependencies <strong>implementation 'com.google.firebase:firebase-firestore:22.1.0'</strong> } </pre> </devsite-expandable> </div> </li> </ol> </section> <section> <h3 id="kotlin+ktx" data-text="Kotlin+KTX"><span class="two-line-tab"><span tab-label="Android">Kotlin+KTX</span></span></h3> <ol> <li>Follow the instructions to <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/android/setup">add Firebase to your Android app</a>.</li> <li>Using the <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/android/learn-more#bom">Firebase Android BoM</a>, declare the dependency for the Cloud Firestore Android library in your <b>module (app-level) Gradle file</b> (usually <code translate="no" dir="ltr">app/build.gradle</code>). <pre class="prettyprint" translate="no" dir="ltr"> dependencies { <strong>// Import the BoM for the Firebase platform implementation platform('com.google.firebase:firebase-bom:26.5.0')</strong> <strong>// Declare the dependency for the Cloud Firestore library</strong> // When using the BoM, you don't specify versions in Firebase library dependencies <strong>implementation 'com.google.firebase:firebase-firestore-ktx'</strong> } </pre> <p>By using the <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/android/learn-more#bom">Firebase Android BoM</a>, your app will always use compatible versions of the Firebase Android libraries. </p> <div> <devsite-expandable> <p class="showalways"><em>(Alternative)</em> Declare Firebase library dependencies <em>without</em> using the BoM </p> <p>If you choose not to use the Firebase BoM, you must specify each Firebase library version in its dependency line. </p> <p><strong>Note that if you use <em>multiple</em> Firebase libraries in your app, we highly recommend using the BoM to manage library versions, which ensures that all versions are compatible.</strong> </p> <pre class="prettyprint" translate="no" dir="ltr"> dependencies { <strong>// Declare the dependency for the Cloud Firestore library</strong> // When NOT using the BoM, you must specify versions in Firebase library dependencies <strong>implementation 'com.google.firebase:firebase-firestore-ktx:22.1.0'</strong> } </pre> </devsite-expandable> </div> </li> </ol> </section> <section> <h5 id="java_1" data-text="Java">Java</h5> <ol> <!--Start firesite instructions --> <li>Add the Firebase Admin SDK to your app: <ul><li> <b>Using Gradle:</b> <pre class="prettyprint" translate="no" dir="ltr"> compile 'com.google.firebase:firebase-admin:7.1.0' </pre> </li> <li> <b>Using Maven:</b> <pre class="prettyprint" translate="no" dir="ltr"> <dependency> <groupId>com.google.firebase</groupId> <artifactId>firebase-admin</artifactId> <version>7.1.0</version> </dependency> </pre> </li></ul> </li> <li>Follow the instructions below to initialize Cloud Firestore with the proper credentials in your environment.</li> <!--Start cloudsite instructions --> </li> </ol> </section> <section> <h5 id="python" data-text="Python">Python</h5> <ol> <!-- Start firesite instructions --> <li>Add the Firebase Admin SDK to your Python app: <pre class="prettyprint" translate="no" dir="ltr"> pip install --upgrade firebase-admin</pre> </li> <li>Follow the instructions below to initialize Cloud Firestore with the proper credentials in your environment.</li> <!-- Start cloudsite instructions --> </ol> </section> <section> <h5 id="c++" data-text="C++">C++</h5> <ol> <li>Follow the instructions to <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/cpp/setup">add Firebase to your C++ project</a>.</li> <li><strong>C++ interface for Android.</strong></li> <ul> <li><strong>Gradle dependencies.</strong> Add the following to your module (app-level) Gradle file (usually <code translate="no" dir="ltr">app/build.gradle</code>): <pre class="prettyprint" translate="no" dir="ltr"> android.defaultConfig.externalNativeBuild.cmake { arguments "-DFIREBASE_CPP_SDK_DIR=$gradle.firebase_cpp_sdk_dir" } apply from: "$gradle.firebase_cpp_sdk_dir/Android/firebase_dependencies.gradle" firebaseCpp.dependencies { // earlier entries auth firestore } </pre> </li> <li><strong>Binary dependencies.</strong> Similarly, the recommended way to get the binary dependencies is to add the following to your <code translate="no" dir="ltr">CMakeLists.txt</code> file: <pre class="prettyprint" translate="no" dir="ltr"> add_subdirectory(${FIREBASE_CPP_SDK_DIR} bin/ EXCLUDE_FROM_ALL) set(firebase_libs firebase_auth firebase_firestore firebase_app) # Replace the target name below with the actual name of your target, # for example, "native-lib". target_link_libraries(${YOUR_TARGET_NAME_HERE} "${firebase_libs}") </pre> </li> </ul> <li>To set up <strong>desktop integration</strong>, see <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/cpp/setup#desktop-workflow">Add Firebase to your C++ project</a>.</li> </ol> </section> <section> <h5 id="unity" data-text="Unity">Unity</h5> <ol> <li>Follow the instructions to <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/unity/setup">add Firebase to your Unity project</a>.</li> <li><strong>Unity interface for Android.</strong></li> <p> When building for Android, enable ProGuarding to avoid the Android DEX limit. To do so, in the Unity editor: </p> <ol type="1"> <li>Select File > Build Settings</li> <li>Switch ‘Platform’ to ‘Android’ and click ‘Switch Platform’</li> <li>Click ‘Player Settings…’</li> <li>In main Unity UI, under ‘Settings for Android’, select ‘Publishing Settings’</li> <li>Under ‘Minify’ section, change both Release and Debug settings from ‘None’ to ‘ProGuard’</li> </ol> </ol> </section> <section> <h5 id="node.js" data-text="Node.js">Node.js</h5> <ol> <li> Add the Firebase Admin SDK to your app: <pre class="prettyprint" translate="no" dir="ltr"> npm install firebase-admin --save</pre> </li> <li> Follow the instructions below to initialize Cloud Firestore with the proper credentials in your environment. </li> </ol> </section> <section> <h5 id="go" data-text="Go">Go</h5> <ol> <!-- Start firesite instructions --> <li>Add the Firebase Admin SDK to your Go app: <pre class="prettyprint" translate="no" dir="ltr"> go get firebase.google.com/go </pre> </li> <li>Follow the instructions below to initialize Cloud Firestore with the proper credentials in your environment.</li> <!-- Start cloudsite instructions --> </li> </ol> </section> <section> <h5 id="php" data-text="PHP">PHP</h5> <ol> <li> The Cloud Firestore server client libraries (Java, Node.js, Python, Go, PHP, C#, and Ruby) use <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/docs/authentication/production">Google Application Default Credentials</a> for authentication. <ul> <li> To authenticate from your development environment, set the <code translate="no" dir="ltr">GOOGLE_APPLICATION_CREDENTIALS</code> environment variable to point to a JSON service account key file. You can create a key file on the <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/projectselector/apis/credentials">API Console Credentials page</a>. <pre class="prettyprint" translate="no" dir="ltr"> export GOOGLE_APPLICATION_CREDENTIALS="path/to/your/keyfile.json"</pre> </li> <li> In your production environment, you do not need to authenticate if you run your application on App Engine or Compute Engine, using the same project that you use for Cloud Firestore. Otherwise, <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/docs/authentication/getting-started">set up a service account</a>. </li> </ul> </li> <li> Install and enable the <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/php/grpc">gRPC extension</a> for PHP, which you will need to use the client library. </li> <li> Add the Cloud Firestore PHP library to your app: <pre class="prettyprint" translate="no" dir="ltr">composer require google/cloud-firestore</pre> </li> </ol> </section> <section> <h5 id="c" data-text="C#">C#</h5> <ol> <li> The Cloud Firestore server client libraries (Java, Node.js, Python, Go, PHP, C#, and Ruby) use <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/docs/authentication/production">Google Application Default Credentials</a> for authentication. <ul> <li> To authenticate from your development environment, set the <code translate="no" dir="ltr">GOOGLE_APPLICATION_CREDENTIALS</code> environment variable to point to a JSON service account key file. You can create a key file on the <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/projectselector/apis/credentials">API Console Credentials page</a>. <pre class="prettyprint" translate="no" dir="ltr"> export GOOGLE_APPLICATION_CREDENTIALS="path/to/your/keyfile.json"</pre> </li> <li> In your production environment, you do not need to authenticate if you run your application on App Engine or Compute Engine, using the same project that you use for Cloud Firestore. Otherwise, <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/docs/authentication/getting-started">set up a service account</a>. </li> </ul> </li> <li> Add the Cloud Firestore C# library to your app in your <code translate="no" dir="ltr">.csproj</code> file: <pre class="prettyprint" translate="no" dir="ltr"> <ItemGroup> <PackageReference Include="Google.Cloud.Firestore" Version="1.1.0-beta01" /> </ItemGroup></pre> </li> <li> Add the following to your <code translate="no" dir="ltr">Program.cs</code> file: <pre class="prettyprint" translate="no" dir="ltr">using Google.Cloud.Firestore;</pre> </li> </ol> </section> <section> <h5 id="ruby" data-text="Ruby">Ruby</h5> <ol> <li> The Cloud Firestore server client libraries (Java, Node.js, Python, Go, PHP, C#, and Ruby) use <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/docs/authentication/production">Google Application Default Credentials</a> for authentication. <ul> <li> To authenticate from your development environment, set the <code translate="no" dir="ltr">GOOGLE_APPLICATION_CREDENTIALS</code> environment variable to point to a JSON service account key file. You can create a key file on the <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/projectselector/apis/credentials">API Console Credentials page</a>. <pre class="prettyprint" translate="no" dir="ltr"> export GOOGLE_APPLICATION_CREDENTIALS="path/to/your/keyfile.json"</pre> </li> <li> In your production environment, you do not need to authenticate if you run your application on App Engine or Compute Engine, using the same project that you use for Cloud Firestore. Otherwise, <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/docs/authentication/getting-started">set up a service account</a>. </li> </ul> </li> <li> Add the Cloud Firestore Ruby library to your app in your <code translate="no" dir="ltr">Gemfile</code>: <pre class="prettyprint" translate="no" dir="ltr">gem "google-cloud-firestore"</pre> </li> <li> Install dependencies from your <code translate="no" dir="ltr">Gemfile</code> using: <pre class="prettyprint" translate="no" dir="ltr">bundle install</pre> </li> </ol> </section> </div> <h2 id="initialize" data-text="Initialize Cloud Firestore">Initialize Cloud Firestore</h2> <p>Initialize an instance of Cloud Firestore:</p> <div class="ds-selector-tabs" data-ds-scope="lang"> <section> <h5 id="web_1" data-text="Web">Web</h5> <!-- includecode_todo --> <pre class="prettyprint" translate="no" dir="ltr"> // Initialize Cloud Firestore through Firebase firebase.initializeApp({ apiKey: '### FIREBASE API KEY ###', authDomain: '### FIREBASE AUTH DOMAIN ###', projectId: '### CLOUD FIRESTORE PROJECT ID ###' }); var db = firebase.firestore(); </pre> The values for `initializeApp` can be found in your web app's <a href="https://web.archive.org/web/20210226045348/https://support.google.com/firebase/answer/7015592">`firebaseConfig`</a>. To persist data when the device loses its connection, see the <a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/enable-offline">Enable Offline Data</a> documentation. </section> <section> <h5 id="swift" data-text="Swift">Swift</h5> <pre class="prettyprint" translate="no" dir="ltr"> import Firebase FirebaseApp.configure() let db = Firestore.firestore()<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/swift/firestore-smoketest/AppDelegate.swift#L31-L33" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/swift/firestore-smoketest/AppDelegate.swift#default_firestore" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/swift/firestore-smoketest/AppDelegate.swift" data-region-tag="default_firestore">AppDelegate.swift</a></div> </pre> </section> <section> <h5 id="objective-c" data-text="Objective-C">Objective-C</h5> <pre class="prettyprint" translate="no" dir="ltr"> @import Firebase; // Use Firebase library to configure APIs [FIRApp configure]; FIRFirestore *defaultFirestore = [FIRFirestore firestore];<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/objc/firestore-smoketest-objc/AppDelegate.m#L31-L31" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/AppDelegate.m#default_firestore" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/AppDelegate.m" data-region-tag="default_firestore">AppDelegate.m</a></div> </pre> </section> <section> <h3 id="java_2" data-text="Java"><span class="two-line-tab"><span tab-label="Android">Java</span></span></h3> <pre class="prettyprint" translate="no" dir="ltr"> // Access a Cloud Firestore instance from your Activity FirebaseFirestore db = FirebaseFirestore.getInstance();<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#L134-L134" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#get_firestore_instance" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java" data-region-tag="get_firestore_instance">DocSnippets.java</a></div> </pre> </section> <section> <h3 id="kotlin+ktx_1" data-text="Kotlin+KTX"><span class="two-line-tab"><span tab-label="Android">Kotlin+KTX</span></span></h3> <pre class="prettyprint lang-kotlin" translate="no" dir="ltr"> // Access a Cloud Firestore instance from your Activity val db = Firebase.firestore<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#L109-L109" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#get_firestore_instance" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt" data-region-tag="get_firestore_instance">DocSnippets.kt</a></div> </pre> </section> <section> <h5 id="java_3" data-text="Java">Java</h5> The Cloud Firestore SDK is initialized in different ways depending on your environment. Below are the most common methods. For a complete reference, see <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/admin/setup#initialize-sdk">Initialize the Admin SDK</a>. <li> <b>Initialize on Google Cloud Platform</b> <pre class="prettyprint" translate="no" dir="ltr"> import com.google.auth.oauth2.GoogleCredentials; import com.google.cloud.firestore.Firestore; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; // Use the application default credentials GoogleCredentials credentials = GoogleCredentials.getApplicationDefault(); FirebaseOptions options = new FirebaseOptions.Builder() .setCredentials(credentials) .setProjectId(projectId) .build(); FirebaseApp.initializeApp(options); Firestore db = FirestoreClient.getFirestore(); </pre> </li> <li> <b>Initialize on your own server</b> <p> To use the Firebase Admin SDK on your own server, use a <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/compute/docs/authentication">service account</a>.</p> <p>Go to <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/iam-admin/serviceaccounts"><b>IAM & admin > Service accounts</b></a> in the Cloud Platform Console. Generate a new private key and save the JSON file. Then use the file to initialize the SDK: </p> <pre class="prettyprint" translate="no" dir="ltr"> import com.google.auth.oauth2.GoogleCredentials; import com.google.cloud.firestore.Firestore; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; // Use a service account InputStream serviceAccount = new FileInputStream("<var translate="no">path/to/serviceAccount.json</var>"); GoogleCredentials credentials = GoogleCredentials.fromStream(serviceAccount); FirebaseOptions options = new FirebaseOptions.Builder() .setCredentials(credentials) .build(); FirebaseApp.initializeApp(options); Firestore db = FirestoreClient.getFirestore(); </pre> </section> <section> <h5 id="python_1" data-text="Python">Python</h5> The Cloud Firestore SDK is initialized in different ways depending on your environment. Below are the most common methods. For a complete reference, see <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/admin/setup#initialize-sdk">Initialize the Admin SDK</a>. <li> <b>Initialize on Google Cloud Platform</b> <pre class="prettyprint" translate="no" dir="ltr"> import firebase_admin from firebase_admin import credentials from firebase_admin import firestore # Use the application default credentials cred = credentials.ApplicationDefault() firebase_admin.initialize_app(cred, { 'projectId': project_id, }) db = firestore.client() </pre> </li> <li> <b>Initialize on your own server</b> <p> To use the Firebase Admin SDK on your own server, use a <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/compute/docs/authentication">service account</a>.</p> <p>Go to <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/iam-admin/serviceaccounts"><b>IAM & admin > Service accounts</b></a> in the Cloud Platform Console. Generate a new private key and save the JSON file. Then use the file to initialize the SDK: </p> <pre class="prettyprint" translate="no" dir="ltr"> import firebase_admin from firebase_admin import credentials from firebase_admin import firestore # Use a service account cred = credentials.Certificate('<var translate="no">path/to/serviceAccount.json</var>') firebase_admin.initialize_app(cred) db = firestore.client() </pre> </section> <section> <h5 id="c++_1" data-text="C++">C++</h5> <pre class="prettyprint" translate="no" dir="ltr"> // Make sure the call to `Create()` happens some time before you call Firestore::GetInstance(). App::Create(); Firestore* db = Firestore::GetInstance();<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-cpp/blob/7c0ddc1923c85b025877a9186e46eac74c2a9ba5/firestore/ios/firestore-snippets-cpp/AppDelegate.mm#L34-L36" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-cpp/firestore/ios/firestore-snippets-cpp/AppDelegate.mm#get_firestore_instance" data-code-snippet="true" data-github-path="firebase/snippets-cpp/firestore/ios/firestore-snippets-cpp/AppDelegate.mm" data-region-tag="get_firestore_instance">AppDelegate.mm</a></div> </pre> </section> <section> <h5 id="node.js_1" data-text="Node.js">Node.js</h5> The Cloud Firestore SDK is initialized in different ways depending on your environment. Below are the most common methods. For a complete reference, see <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/admin/setup#initialize-sdk">Initialize the Admin SDK</a>. <ul> <li> <b>Initialize on Cloud Functions</b> <pre class="prettyprint" translate="no" dir="ltr"> const admin = require('firebase-admin'); admin.initializeApp(); const db = admin.firestore(); <div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-node/blob/c1f54bc8348837a9d0c0b557b08482c67ce7afcb/firestore/main/index.js#L26-L29" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-node/firestore/main/index.js#initialize_app_functions" data-code-snippet="true" data-github-path="firebase/snippets-node/firestore/main/index.js" data-region-tag="initialize_app_functions">index.js</a></div> </pre> </li> <li> <b>Initialize on Google Cloud Platform</b> <pre class="prettyprint" translate="no" dir="ltr"> const admin = require('firebase-admin'); admin.initializeApp({ credential: admin.credential.applicationDefault() }); const db = admin.firestore();<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-node/blob/c1f54bc8348837a9d0c0b557b08482c67ce7afcb/firestore/main/index.js#L13-L18" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-node/firestore/main/index.js#initialize_app" data-code-snippet="true" data-github-path="firebase/snippets-node/firestore/main/index.js" data-region-tag="initialize_app">index.js</a></div> </pre> </li> <li> <b>Initialize on your own server</b> <p> To use the Firebase Admin SDK on your own server (or any other Node.js environment), use a <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/compute/docs/authentication">service account</a>. Go to <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/iam-admin/serviceaccounts"><b>IAM & admin > Service accounts</b></a> in the Cloud Platform Console. Generate a new private key and save the JSON file. Then use the file to initialize the SDK: </p> <pre class="prettyprint" translate="no" dir="ltr"> const admin = require('firebase-admin'); const serviceAccount = require('./path/to/serviceAccountKey.json'); admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); const db = admin.firestore(); <div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-node/blob/c1f54bc8348837a9d0c0b557b08482c67ce7afcb/firestore/main/index.js#L36-L44" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-node/firestore/main/index.js#initialize_app_service_account" data-code-snippet="true" data-github-path="firebase/snippets-node/firestore/main/index.js" data-region-tag="initialize_app_service_account">index.js</a></div> </pre> </li> </ul> </section> <section> <h5 id="go_1" data-text="Go">Go</h5> The Cloud Firestore SDK is initialized in different ways depending on your environment. Below are the most common methods. For a complete reference, see <a href="https://web.archive.org/web/20210226045348/https://firebase.google.com/docs/admin/setup#initialize-sdk">Initialize the Admin SDK</a>. <li> <b>Initialize on Google Cloud Platform</b> <pre class="prettyprint" translate="no" dir="ltr"> import ( "log" firebase "firebase.google.com/go" "google.golang.org/api/option" ) // Use the application default credentials ctx := context.Background() conf := &firebase.Config;{ProjectID: projectID} app, err := firebase.NewApp(ctx, conf) if err != nil { log.Fatalln(err) } client, err := app.Firestore(ctx) if err != nil { log.Fatalln(err) } defer client.Close() </pre> </li> <li> <b>Initialize on your own server</b> <p> To use the Firebase Admin SDK on your own server, use a <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/compute/docs/authentication">service account</a>.</p> <p>Go to <a href="https://web.archive.org/web/20210226045348/https://console.cloud.google.com/iam-admin/serviceaccounts"><b>IAM & admin > Service accounts</b></a> in the Cloud Platform Console. Generate a new private key and save the JSON file. Then use the file to initialize the SDK: </p> <pre class="prettyprint" translate="no" dir="ltr"> import ( "log" firebase "firebase.google.com/go" "google.golang.org/api/option" ) // Use a service account ctx := context.Background() sa := option.WithCredentialsFile("path/to/serviceAccount.json") app, err := firebase.NewApp(ctx, nil, sa) if err != nil { log.Fatalln(err) } client, err := app.Firestore(ctx) if err != nil { log.Fatalln(err) } defer client.Close() </pre> </section> <section> <h5 id="php_1" data-text="PHP">PHP</h5> <pre class="prettyprint" translate="no" dir="ltr"> use Google\Cloud\Firestore\FirestoreClient; /** * Initialize Cloud Firestore with default project ID. * ``` * initialize(); * ``` */ function initialize() { // Create the Cloud Firestore client $db = new FirestoreClient(); printf('Created Cloud Firestore client with default project ID.' . PHP_EOL); }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/php-docs-samples/blob/b28a3aaab4f8c177e63054778da1d9a2046f6518/firestore/src/initialize.php#L27-L40" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/php-docs-samples/firestore/src/initialize.php#fs_initialize" data-code-snippet="true" data-github-path="GoogleCloudPlatform/php-docs-samples/firestore/src/initialize.php" data-region-tag="fs_initialize">initialize.php</a></div> </pre> </section> <section> <h5 id="unity_1" data-text="Unity">Unity</h5> <pre class="prettyprint" translate="no" dir="ltr"> using Firebase.Firestore; using Firebase.Extensions; FirebaseFirestore db = FirebaseFirestore.DefaultInstance; </pre> </section> <section> <h5 id="c_1" data-text="C#">C#</h5> <pre class="prettyprint" translate="no" dir="ltr"> FirestoreDb db = FirestoreDb.Create(project); Console.WriteLine("Created Cloud Firestore client with project ID: {0}", project);<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/cc1a204b2dae56fe69c55b720b878898dedbf757/firestore/api/Quickstart/Program.cs#L37-L38" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs#fs_initialize_project_id" data-code-snippet="true" data-github-path="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs" data-region-tag="fs_initialize_project_id">Program.cs</a></div> </pre> </section> <section> <h5 id="ruby_1" data-text="Ruby">Ruby</h5> <pre class="prettyprint" translate="no" dir="ltr"> require "google/cloud/firestore" firestore = Google::Cloud::Firestore.new project_id: project_id puts "Created Cloud Firestore client with given project ID."<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/google-cloud-ruby/blob/1373855d728f70a32c50f40f5e400b84d65a9798/google-cloud-firestore/samples/quickstart.rb#L19-L23" class="gc-analytics-event" data-category="github_link" data-label="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb#fs_initialize" data-code-snippet="true" data-github-path="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb" data-region-tag="fs_initialize">quickstart.rb</a></div> </pre> </section> </div> <h2 id="add_data" data-text="Add data">Add data</h2> <p>Cloud Firestore stores data in Documents, which are stored in Collections. Cloud Firestore creates collections and documents implicitly the first time you add data to the document. You do not need to explicitly create collections or documents.</p> <p>Create a new collection and a document using the following example code.</p> <div class="ds-selector-tabs" data-ds-scope="lang"> <section> <h5 id="web_2" data-text="Web">Web</h5> <pre class="prettyprint lang-js" translate="no" dir="ltr" data-code-snippet="true" data-github-path="firebase/snippets-web/firestore/test.firestore.js" data-region-tag="add_ada_lovelace">db.collection("users").add({ first: "Ada", last: "Lovelace", born: 1815 }) .then((docRef) => { console.log("Document written with ID: ", docRef.id); }) .catch((error) => { console.error("Error adding document: ", error); });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-web/blob/0cb8dac0c5023535b510ebe61e10e727dd598332/firestore/test.firestore.js#L125-L135" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-web/firestore/test.firestore.js#add_ada_lovelace">test.firestore.js</a></div></pre> </section> <section> <h5 id="swift_1" data-text="Swift">Swift</h5> <pre class="prettyprint" translate="no" dir="ltr"> // Add a new document with a generated ID var ref: DocumentReference? = nil ref = db.collection("users").addDocument(data: [ "first": "Ada", "last": "Lovelace", "born": 1815 ]) { err in if let err = err { print("Error adding document: \(err)") } else { print("Document added with ID: \(ref!.documentID)") } }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/swift/firestore-smoketest/ViewController.swift#L156-L168" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift#add_ada_lovelace" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift" data-region-tag="add_ada_lovelace">ViewController.swift</a></div> </pre> </section> <section> <h5 id="objective-c_1" data-text="Objective-C">Objective-C</h5> <pre class="prettyprint" translate="no" dir="ltr"> // Add a new document with a generated ID __block FIRDocumentReference *ref = [[self.db collectionWithPath:@"users"] addDocumentWithData:@{ @"first": @"Ada", @"last": @"Lovelace", @"born": @1815 } completion:^(NSError * _Nullable error) { if (error != nil) { NSLog(@"Error adding document: %@", error); } else { NSLog(@"Document added with ID: %@", ref.documentID); } }];<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/objc/firestore-smoketest-objc/ViewController.m#L90-L102" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/ViewController.m#add_ada_lovelace" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/ViewController.m" data-region-tag="add_ada_lovelace">ViewController.m</a></div> </pre> </section> <section> <h3 id="java_4" data-text="Java"><span class="two-line-tab"><span tab-label="Android">Java</span></span></h3> <pre class="prettyprint" translate="no" dir="ltr"> // Create a new user with a first and last name Map<String, Object> user = new HashMap<>(); user.put("first", "Ada"); user.put("last", "Lovelace"); user.put("born", 1815); // Add a new document with a generated ID db.collection("users") .add(user) .addOnSuccessListener(new OnSuccessListener<DocumentReference>() { @Override public void onSuccess(DocumentReference documentReference) { Log.d(TAG, "DocumentSnapshot added with ID: " + documentReference.getId()); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Log.w(TAG, "Error adding document", e); } });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#L156-L176" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#add_ada_lovelace" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java" data-region-tag="add_ada_lovelace">DocSnippets.java</a></div> </pre> </section> <section> <h3 id="kotlin+ktx_2" data-text="Kotlin+KTX"><span class="two-line-tab"><span tab-label="Android">Kotlin+KTX</span></span></h3> <pre class="prettyprint lang-kotlin" translate="no" dir="ltr"> // Create a new user with a first and last name val user = hashMapOf( "first" to "Ada", "last" to "Lovelace", "born" to 1815 ) // Add a new document with a generated ID db.collection("users") .add(user) .addOnSuccessListener { documentReference -> Log.d(TAG, "DocumentSnapshot added with ID: ${documentReference.id}") } .addOnFailureListener { e -> Log.w(TAG, "Error adding document", e) }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#L131-L146" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#add_ada_lovelace" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt" data-region-tag="add_ada_lovelace">DocSnippets.kt</a></div> </pre> </section> <section> <h5 id="java_5" data-text="Java">Java</h5> <pre class="prettyprint" translate="no" dir="ltr"> DocumentReference docRef = db.collection("users").document("alovelace"); // Add document data with id "alovelace" using a hashmap Map<String, Object> data = new HashMap<>(); data.put("first", "Ada"); data.put("last", "Lovelace"); data.put("born", 1815); //asynchronously write data ApiFuture<WriteResult> result = docRef.set(data); // ... // result.get() blocks on response System.out.println("Update time : " + result.get().getUpdateTime());<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/java-firestore/blob/d7f42fb526faede08f0e9ce367b0e115a6dc1ee2/samples/snippets/src/main/java/com/example/firestore/Quickstart.java#L83-L95" class="gc-analytics-event" data-category="github_link" data-label="googleapis/java-firestore/samples/snippets/src/main/java/com/example/firestore/Quickstart.java#fs_add_data_1" data-code-snippet="true" data-github-path="googleapis/java-firestore/samples/snippets/src/main/java/com/example/firestore/Quickstart.java" data-region-tag="fs_add_data_1">Quickstart.java</a></div> </pre> </section> <section> <h5 id="python_2" data-text="Python">Python</h5> <pre class="prettyprint" translate="no" dir="ltr"> doc_ref = db.collection(u'users').document(u'alovelace') doc_ref.set({ u'first': u'Ada', u'last': u'Lovelace', u'born': 1815 })<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/python-docs-samples/blob/16941a107eec9e1437a7a1422e5139701a32a137/firestore/cloud-client/snippets.py#L37-L44" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/python-docs-samples/firestore/cloud-client/snippets.py#quickstart_add_data_one" data-code-snippet="true" data-github-path="GoogleCloudPlatform/python-docs-samples/firestore/cloud-client/snippets.py" data-region-tag="quickstart_add_data_one">snippets.py</a></div> </pre> </section> <section> <h5 id="c++_2" data-text="C++">C++</h5> <pre class="prettyprint" translate="no" dir="ltr"> // Add a new document with a generated ID Future<DocumentReference> user_ref = db->Collection("users").Add({{"first", FieldValue::String("Ada")}, {"last", FieldValue::String("Lovelace")}, {"born", FieldValue::Integer(1815)}}); user_ref.OnCompletion([](const Future<DocumentReference>& future) { if (future.error() == Error::kErrorOk) { std::cout << "DocumentSnapshot added with ID: " << future.result()->id() << '\n'; } else { std::cout << "Error adding document: " << future.error_message() << '\n'; } });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-cpp/blob/7c0ddc1923c85b025877a9186e46eac74c2a9ba5/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp#L79-L92" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-cpp/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp#add_ada_lovelace" data-code-snippet="true" data-github-path="firebase/snippets-cpp/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp" data-region-tag="add_ada_lovelace">snippets.cpp</a></div> </pre> </section> <section> <h5 id="node.js_2" data-text="Node.js">Node.js</h5> <pre class="prettyprint" translate="no" dir="ltr"> const docRef = db.collection('users').doc('alovelace'); await docRef.set({ first: 'Ada', last: 'Lovelace', born: 1815 });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-node/blob/c1f54bc8348837a9d0c0b557b08482c67ce7afcb/firestore/main/index.js#L67-L75" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-node/firestore/main/index.js#add_lovelace" data-code-snippet="true" data-github-path="firebase/snippets-node/firestore/main/index.js" data-region-tag="add_lovelace">index.js</a></div> </pre> </section> <section> <h5 id="go_2" data-text="Go">Go</h5> <pre class="prettyprint" translate="no" dir="ltr"> _, _, err := client.Collection("users").Add(ctx, map[string]interface{}{ "first": "Ada", "last": "Lovelace", "born": 1815, }) if err != nil { log.Fatalf("Failed adding alovelace: %v", err) }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/golang-samples/blob/1555fafbf591676f21b26ebc5092c725a7503f9e/firestore/firestore_quickstart/main.go#L53-L62" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/golang-samples/firestore/firestore_quickstart/main.go#fs_add_data_1" data-code-snippet="true" data-github-path="GoogleCloudPlatform/golang-samples/firestore/firestore_quickstart/main.go" data-region-tag="fs_add_data_1">main.go</a></div> </pre> </section> <section> <h5 id="php_2" data-text="PHP">PHP</h5> <pre class="prettyprint" translate="no" dir="ltr"> $docRef = $db->collection('users')->document('lovelace'); $docRef->set([ 'first' => 'Ada', 'last' => 'Lovelace', 'born' => 1815 ]); printf('Added data to the lovelace document in the users collection.' . PHP_EOL);<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/php-docs-samples/blob/b28a3aaab4f8c177e63054778da1d9a2046f6518/firestore/src/add_data.php#L41-L47" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/php-docs-samples/firestore/src/add_data.php#fs_add_data_1" data-code-snippet="true" data-github-path="GoogleCloudPlatform/php-docs-samples/firestore/src/add_data.php" data-region-tag="fs_add_data_1">add_data.php</a></div> </pre> </section> <section> <h5 id="unity_2" data-text="Unity">Unity</h5> <pre class="prettyprint" translate="no" dir="ltr"> DocumentReference docRef = db.Collection("users").Document("alovelace"); Dictionary<string, object> user = new Dictionary<string, object> { { "First", "Ada" }, { "Last", "Lovelace" }, { "Born", 1815 }, }; docRef.SetAsync(user).ContinueWithOnMainThread(task => { Debug.Log("Added data to the alovelace document in the users collection."); }); </pre> </section> <section> <h5 id="c_2" data-text="C#">C#</h5> <pre class="prettyprint" translate="no" dir="ltr"> DocumentReference docRef = db.Collection("users").Document("alovelace"); Dictionary<string, object> user = new Dictionary<string, object> { { "First", "Ada" }, { "Last", "Lovelace" }, { "Born", 1815 } }; await docRef.SetAsync(user);<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/cc1a204b2dae56fe69c55b720b878898dedbf757/firestore/api/Quickstart/Program.cs#L46-L53" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs#fs_add_data_1" data-code-snippet="true" data-github-path="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs" data-region-tag="fs_add_data_1">Program.cs</a></div> </pre> </section> <section> <h5 id="ruby_2" data-text="Ruby">Ruby</h5> <pre class="prettyprint" translate="no" dir="ltr"> doc_ref = firestore.doc "#{collection_path}/alovelace" doc_ref.set( first: "Ada", last: "Lovelace", born: 1815 ) puts "Added data to the alovelace document in the users collection."<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/google-cloud-ruby/blob/1373855d728f70a32c50f40f5e400b84d65a9798/google-cloud-firestore/samples/quickstart.rb#L33-L41" class="gc-analytics-event" data-category="github_link" data-label="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb#fs_add_data_1" data-code-snippet="true" data-github-path="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb" data-region-tag="fs_add_data_1">quickstart.rb</a></div> </pre> </section> </div> <p>Now add another document to the <code translate="no" dir="ltr">users</code> collection. Notice that this document includes a key-value pair (middle name) that does not appear in the first document. Documents in a collection can contain different sets of information.</p> <div class="ds-selector-tabs" data-ds-scope="lang"> <section> <h5 id="web_3" data-text="Web">Web</h5> <pre class="prettyprint lang-js" translate="no" dir="ltr" data-code-snippet="true" data-github-path="firebase/snippets-web/firestore/test.firestore.js" data-region-tag="add_alan_turing">// Add a second document with a generated ID. db.collection("users").add({ first: "Alan", middle: "Mathison", last: "Turing", born: 1912 }) .then((docRef) => { console.log("Document written with ID: ", docRef.id); }) .catch((error) => { console.error("Error adding document: ", error); });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-web/blob/0cb8dac0c5023535b510ebe61e10e727dd598332/firestore/test.firestore.js#L155-L167" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-web/firestore/test.firestore.js#add_alan_turing">test.firestore.js</a></div></pre> </section> <section> <h5 id="swift_2" data-text="Swift">Swift</h5> <pre class="prettyprint" translate="no" dir="ltr"> // Add a second document with a generated ID. ref = db.collection("users").addDocument(data: [ "first": "Alan", "middle": "Mathison", "last": "Turing", "born": 1912 ]) { err in if let err = err { print("Error adding document: \(err)") } else { print("Document added with ID: \(ref!.documentID)") } }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/swift/firestore-smoketest/ViewController.swift#L176-L188" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift#add_alan_turing" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift" data-region-tag="add_alan_turing">ViewController.swift</a></div> </pre> </section> <section> <h5 id="objective-c_2" data-text="Objective-C">Objective-C</h5> <pre class="prettyprint" translate="no" dir="ltr"> // Add a second document with a generated ID. __block FIRDocumentReference *ref = [[self.db collectionWithPath:@"users"] addDocumentWithData:@{ @"first": @"Alan", @"middle": @"Mathison", @"last": @"Turing", @"born": @1912 } completion:^(NSError * _Nullable error) { if (error != nil) { NSLog(@"Error adding document: %@", error); } else { NSLog(@"Document added with ID: %@", ref.documentID); } }];<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/objc/firestore-smoketest-objc/ViewController.m#L108-L121" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/ViewController.m#add_alan_turing" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/ViewController.m" data-region-tag="add_alan_turing">ViewController.m</a></div> </pre> </section> <section> <h3 id="java_6" data-text="Java"><span class="two-line-tab"><span tab-label="Android">Java</span></span></h3> <pre class="prettyprint" translate="no" dir="ltr"> // Create a new user with a first, middle, and last name Map<String, Object> user = new HashMap<>(); user.put("first", "Alan"); user.put("middle", "Mathison"); user.put("last", "Turing"); user.put("born", 1912); // Add a new document with a generated ID db.collection("users") .add(user) .addOnSuccessListener(new OnSuccessListener<DocumentReference>() { @Override public void onSuccess(DocumentReference documentReference) { Log.d(TAG, "DocumentSnapshot added with ID: " + documentReference.getId()); } }) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull Exception e) { Log.w(TAG, "Error adding document", e); } });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#L183-L204" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#add_alan_turing" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java" data-region-tag="add_alan_turing">DocSnippets.java</a></div> </pre> </section> <section> <h3 id="kotlin+ktx_3" data-text="Kotlin+KTX"><span class="two-line-tab"><span tab-label="Android">Kotlin+KTX</span></span></h3> <pre class="prettyprint lang-kotlin" translate="no" dir="ltr"> // Create a new user with a first, middle, and last name val user = hashMapOf( "first" to "Alan", "middle" to "Mathison", "last" to "Turing", "born" to 1912 ) // Add a new document with a generated ID db.collection("users") .add(user) .addOnSuccessListener { documentReference -> Log.d(TAG, "DocumentSnapshot added with ID: ${documentReference.id}") } .addOnFailureListener { e -> Log.w(TAG, "Error adding document", e) }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#L152-L168" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#add_alan_turing" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt" data-region-tag="add_alan_turing">DocSnippets.kt</a></div> </pre> </section> <section> <h5 id="java_7" data-text="Java">Java</h5> <pre class="prettyprint" translate="no" dir="ltr"> DocumentReference docRef = db.collection("users").document("aturing"); // Add document data with an additional field ("middle") Map<String, Object> data = new HashMap<>(); data.put("first", "Alan"); data.put("middle", "Mathison"); data.put("last", "Turing"); data.put("born", 1912); ApiFuture<WriteResult> result = docRef.set(data); System.out.println("Update time : " + result.get().getUpdateTime());<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/java-firestore/blob/d7f42fb526faede08f0e9ce367b0e115a6dc1ee2/samples/snippets/src/main/java/com/example/firestore/Quickstart.java#L101-L112" class="gc-analytics-event" data-category="github_link" data-label="googleapis/java-firestore/samples/snippets/src/main/java/com/example/firestore/Quickstart.java#fs_add_data_2" data-code-snippet="true" data-github-path="googleapis/java-firestore/samples/snippets/src/main/java/com/example/firestore/Quickstart.java" data-region-tag="fs_add_data_2">Quickstart.java</a></div> </pre> </section> <section> <h5 id="python_3" data-text="Python">Python</h5> <pre class="prettyprint" translate="no" dir="ltr"> doc_ref = db.collection(u'users').document(u'aturing') doc_ref.set({ u'first': u'Alan', u'middle': u'Mathison', u'last': u'Turing', u'born': 1912 })<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/python-docs-samples/blob/16941a107eec9e1437a7a1422e5139701a32a137/firestore/cloud-client/snippets.py#L51-L59" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/python-docs-samples/firestore/cloud-client/snippets.py#quickstart_add_data_two" data-code-snippet="true" data-github-path="GoogleCloudPlatform/python-docs-samples/firestore/cloud-client/snippets.py" data-region-tag="quickstart_add_data_two">snippets.py</a></div> </pre> </section> <section> <h5 id="c++_3" data-text="C++">C++</h5> <pre class="prettyprint" translate="no" dir="ltr"> db->Collection("users") .Add({{"first", FieldValue::String("Alan")}, {"middle", FieldValue::String("Mathison")}, {"last", FieldValue::String("Turing")}, {"born", FieldValue::Integer(1912)}}) .OnCompletion([](const Future<DocumentReference>& future) { if (future.error() == Error::kErrorOk) { std::cout << "DocumentSnapshot added with ID: " << future.result()->id() << '\n'; } else { std::cout << "Error adding document: " << future.error_message() << '\n'; } });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-cpp/blob/7c0ddc1923c85b025877a9186e46eac74c2a9ba5/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp#L101-L114" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-cpp/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp#add_alan_turing" data-code-snippet="true" data-github-path="firebase/snippets-cpp/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp" data-region-tag="add_alan_turing">snippets.cpp</a></div> </pre> </section> <section> <h5 id="node.js_3" data-text="Node.js">Node.js</h5> <pre class="prettyprint" translate="no" dir="ltr"> const aTuringRef = db.collection('users').doc('aturing'); await aTuringRef.set({ 'first': 'Alan', 'middle': 'Mathison', 'last': 'Turing', 'born': 1912 });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-node/blob/c1f54bc8348837a9d0c0b557b08482c67ce7afcb/firestore/main/index.js#L79-L88" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-node/firestore/main/index.js#add_turing" data-code-snippet="true" data-github-path="firebase/snippets-node/firestore/main/index.js" data-region-tag="add_turing">index.js</a></div> </pre> </section> <section> <h5 id="go_3" data-text="Go">Go</h5> <pre class="prettyprint" translate="no" dir="ltr"> _, _, err = client.Collection("users").Add(ctx, map[string]interface{}{ "first": "Alan", "middle": "Mathison", "last": "Turing", "born": 1912, }) if err != nil { log.Fatalf("Failed adding aturing: %v", err) }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/golang-samples/blob/1555fafbf591676f21b26ebc5092c725a7503f9e/firestore/firestore_quickstart/main.go#L66-L76" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/golang-samples/firestore/firestore_quickstart/main.go#fs_add_data_2" data-code-snippet="true" data-github-path="GoogleCloudPlatform/golang-samples/firestore/firestore_quickstart/main.go" data-region-tag="fs_add_data_2">main.go</a></div> </pre> </section> <section> <h5 id="php_3" data-text="PHP">PHP</h5> <pre class="prettyprint" translate="no" dir="ltr"> $docRef = $db->collection('users')->document('aturing'); $docRef->set([ 'first' => 'Alan', 'middle' => 'Mathison', 'last' => 'Turing', 'born' => 1912 ]); printf('Added data to the aturing document in the users collection.' . PHP_EOL);<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/php-docs-samples/blob/b28a3aaab4f8c177e63054778da1d9a2046f6518/firestore/src/add_data.php#L50-L57" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/php-docs-samples/firestore/src/add_data.php#fs_add_data_2" data-code-snippet="true" data-github-path="GoogleCloudPlatform/php-docs-samples/firestore/src/add_data.php" data-region-tag="fs_add_data_2">add_data.php</a></div> </pre> </section> <section> <h5 id="unity_3" data-text="Unity">Unity</h5> <pre class="prettyprint" translate="no" dir="ltr"> DocumentReference docRef = db.Collection("users").Document("aturing"); Dictionary<string, object> user = new Dictionary<string, object> { { "First", "Alan" }, { "Middle", "Mathison" }, { "Last", "Turing" }, { "Born", 1912 } }; docRef.SetAsync(user).ContinueWithOnMainThread(task => { Debug.Log("Added data to the aturing document in the users collection."); }); </pre> </section> <section> <h5 id="c_3" data-text="C#">C#</h5> <pre class="prettyprint" translate="no" dir="ltr"> DocumentReference docRef = db.Collection("users").Document("aturing"); Dictionary<string, object> user = new Dictionary<string, object> { { "First", "Alan" }, { "Middle", "Mathison" }, { "Last", "Turing" }, { "Born", 1912 } }; await docRef.SetAsync(user);<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/cc1a204b2dae56fe69c55b720b878898dedbf757/firestore/api/Quickstart/Program.cs#L62-L70" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs#fs_add_data_2" data-code-snippet="true" data-github-path="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs" data-region-tag="fs_add_data_2">Program.cs</a></div> </pre> </section> <section> <h5 id="ruby_3" data-text="Ruby">Ruby</h5> <pre class="prettyprint" translate="no" dir="ltr"> doc_ref = firestore.doc "#{collection_path}/aturing" doc_ref.set( first: "Alan", middle: "Mathison", last: "Turing", born: 1912 ) puts "Added data to the aturing document in the users collection."<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/google-cloud-ruby/blob/1373855d728f70a32c50f40f5e400b84d65a9798/google-cloud-firestore/samples/quickstart.rb#L51-L60" class="gc-analytics-event" data-category="github_link" data-label="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb#fs_add_data_2" data-code-snippet="true" data-github-path="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb" data-region-tag="fs_add_data_2">quickstart.rb</a></div> </pre> </section> </div> <h2 id="read_data" data-text="Read data">Read data</h2> <p>To quickly verify that you've added data to Cloud Firestore, use the data viewer in the <a href="https://web.archive.org/web/20210226045348/https://console.firebase.google.com/project/_/firestore/data">Firebase console</a>.</p> <p>You can also use the "get" method to retrieve the entire collection.</p> <div class="ds-selector-tabs" data-ds-scope="lang"> <section> <h5 id="web_4" data-text="Web">Web</h5> <pre class="prettyprint lang-js" translate="no" dir="ltr" data-code-snippet="true" data-github-path="firebase/snippets-web/firestore/test.firestore.js" data-region-tag="get_all_users">db.collection("users").get().then((querySnapshot) => { querySnapshot.forEach((doc) => { console.log(`${doc.id} => ${doc.data()}`); }); });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-web/blob/0cb8dac0c5023535b510ebe61e10e727dd598332/firestore/test.firestore.js#L143-L147" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-web/firestore/test.firestore.js#get_all_users">test.firestore.js</a></div></pre> </section> <section> <h5 id="swift_3" data-text="Swift">Swift</h5> <pre class="prettyprint" translate="no" dir="ltr"> db.collection("users").getDocuments() { (querySnapshot, err) in if let err = err { print("Error getting documents: \(err)") } else { for document in querySnapshot!.documents { print("\(document.documentID) => \(document.data())") } } }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/swift/firestore-smoketest/ViewController.swift#L194-L202" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift#get_collection" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/swift/firestore-smoketest/ViewController.swift" data-region-tag="get_collection">ViewController.swift</a></div> </pre> </section> <section> <h5 id="objective-c_3" data-text="Objective-C">Objective-C</h5> <pre class="prettyprint" translate="no" dir="ltr"> [[self.db collectionWithPath:@"users"] getDocumentsWithCompletion:^(FIRQuerySnapshot * _Nullable snapshot, NSError * _Nullable error) { if (error != nil) { NSLog(@"Error getting documents: %@", error); } else { for (FIRDocumentSnapshot *document in snapshot.documents) { NSLog(@"%@ => %@", document.documentID, document.data); } } }];<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-ios/blob/861eba090aba16f6a6f229bf8d959ae4f1243569/firestore/objc/firestore-smoketest-objc/ViewController.m#L127-L137" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/ViewController.m#get_collection" data-code-snippet="true" data-github-path="firebase/snippets-ios/firestore/objc/firestore-smoketest-objc/ViewController.m" data-region-tag="get_collection">ViewController.m</a></div> </pre> </section> <section> <h3 id="java_8" data-text="Java"><span class="two-line-tab"><span tab-label="Android">Java</span></span></h3> <pre class="prettyprint" translate="no" dir="ltr"> db.collection("users") .get() .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { if (task.isSuccessful()) { for (QueryDocumentSnapshot document : task.getResult()) { Log.d(TAG, document.getId() + " => " + document.getData()); } } else { Log.w(TAG, "Error getting documents.", task.getException()); } } });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#L210-L223" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java#get_all_users" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/DocSnippets.java" data-region-tag="get_all_users">DocSnippets.java</a></div> </pre> </section> <section> <h3 id="kotlin+ktx_4" data-text="Kotlin+KTX"><span class="two-line-tab"><span tab-label="Android">Kotlin+KTX</span></span></h3> <pre class="prettyprint lang-kotlin" translate="no" dir="ltr"> db.collection("users") .get() .addOnSuccessListener { result -> for (document in result) { Log.d(TAG, "${document.id} => ${document.data}") } } .addOnFailureListener { exception -> Log.w(TAG, "Error getting documents.", exception) }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-android/blob/0cb086ce369b149772f265c92498d1b31a3660fe/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#L174-L183" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt#get_all_users" data-code-snippet="true" data-github-path="firebase/snippets-android/firestore/app/src/main/java/com/google/example/firestore/kotlin/DocSnippets.kt" data-region-tag="get_all_users">DocSnippets.kt</a></div> </pre> </section> <section> <h5 id="java_9" data-text="Java">Java</h5> <pre class="prettyprint" translate="no" dir="ltr"> // asynchronously retrieve all users ApiFuture<QuerySnapshot> query = db.collection("users").get(); // ... // query.get() blocks on response QuerySnapshot querySnapshot = query.get(); List<QueryDocumentSnapshot> documents = querySnapshot.getDocuments(); for (QueryDocumentSnapshot document : documents) { System.out.println("User: " + document.getId()); System.out.println("First: " + document.getString("first")); if (document.contains("middle")) { System.out.println("Middle: " + document.getString("middle")); } System.out.println("Last: " + document.getString("last")); System.out.println("Born: " + document.getLong("born")); }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/java-firestore/blob/d7f42fb526faede08f0e9ce367b0e115a6dc1ee2/samples/snippets/src/main/java/com/example/firestore/Quickstart.java#L155-L169" class="gc-analytics-event" data-category="github_link" data-label="googleapis/java-firestore/samples/snippets/src/main/java/com/example/firestore/Quickstart.java#fs_get_all" data-code-snippet="true" data-github-path="googleapis/java-firestore/samples/snippets/src/main/java/com/example/firestore/Quickstart.java" data-region-tag="fs_get_all">Quickstart.java</a></div> </pre> </section> <section> <h5 id="python_4" data-text="Python">Python</h5> <pre class="prettyprint" translate="no" dir="ltr"> users_ref = db.collection(u'users') docs = users_ref.stream() for doc in docs: print(f'{doc.id} => {doc.to_dict()}')<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/python-docs-samples/blob/16941a107eec9e1437a7a1422e5139701a32a137/firestore/cloud-client/snippets.py#L66-L70" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/python-docs-samples/firestore/cloud-client/snippets.py#quickstart_get_collection" data-code-snippet="true" data-github-path="GoogleCloudPlatform/python-docs-samples/firestore/cloud-client/snippets.py" data-region-tag="quickstart_get_collection">snippets.py</a></div> </pre> </section> <section> <h5 id="c++_4" data-text="C++">C++</h5> <pre class="prettyprint" translate="no" dir="ltr"> Future<QuerySnapshot> users = db->Collection("users").Get(); users.OnCompletion([](const Future<QuerySnapshot>& future) { if (future.error() == Error::kErrorOk) { for (const DocumentSnapshot& document : future.result()->documents()) { std::cout << document << '\n'; } } else { std::cout << "Error getting documents: " << future.error_message() << '\n'; } });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-cpp/blob/7c0ddc1923c85b025877a9186e46eac74c2a9ba5/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp#L131-L141" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-cpp/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp#get_collection" data-code-snippet="true" data-github-path="firebase/snippets-cpp/firestore/android/FirestoreSnippetsCpp/app/src/main/cpp/snippets.cpp" data-region-tag="get_collection">snippets.cpp</a></div> </pre> </section> <section> <h5 id="node.js_4" data-text="Node.js">Node.js</h5> <pre class="prettyprint" translate="no" dir="ltr"> const snapshot = await db.collection('users').get(); snapshot.forEach((doc) => { console.log(doc.id, '=>', doc.data()); });<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/firebase/snippets-node/blob/c1f54bc8348837a9d0c0b557b08482c67ce7afcb/firestore/main/index.js#L104-L109" class="gc-analytics-event" data-category="github_link" data-label="firebase/snippets-node/firestore/main/index.js#quickstart_listen" data-code-snippet="true" data-github-path="firebase/snippets-node/firestore/main/index.js" data-region-tag="quickstart_listen">index.js</a></div> </pre> </section> <section> <h5 id="go_4" data-text="Go">Go</h5> <pre class="prettyprint" translate="no" dir="ltr"> iter := client.Collection("users").Documents(ctx) for { doc, err := iter.Next() if err == iterator.Done { break } if err != nil { log.Fatalf("Failed to iterate: %v", err) } fmt.Println(doc.Data()) }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/golang-samples/blob/1555fafbf591676f21b26ebc5092c725a7503f9e/firestore/firestore_quickstart/main.go#L80-L92" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/golang-samples/firestore/firestore_quickstart/main.go#fs_get_all_users" data-code-snippet="true" data-github-path="GoogleCloudPlatform/golang-samples/firestore/firestore_quickstart/main.go" data-region-tag="fs_get_all_users">main.go</a></div> </pre> </section> <section> <h5 id="php_4" data-text="PHP">PHP</h5> <pre class="prettyprint" translate="no" dir="ltr"> $usersRef = $db->collection('users'); $snapshot = $usersRef->documents(); foreach ($snapshot as $user) { printf('User: %s' . PHP_EOL, $user->id()); printf('First: %s' . PHP_EOL, $user['first']); if (!empty($user['middle'])) { printf('Middle: %s' . PHP_EOL, $user['middle']); } printf('Last: %s' . PHP_EOL, $user['last']); printf('Born: %d' . PHP_EOL, $user['born']); printf(PHP_EOL); } printf('Retrieved and printed out all documents from the users collection.' . PHP_EOL);<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/php-docs-samples/blob/b28a3aaab4f8c177e63054778da1d9a2046f6518/firestore/src/get_all.php#L41-L53" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/php-docs-samples/firestore/src/get_all.php#fs_get_all" data-code-snippet="true" data-github-path="GoogleCloudPlatform/php-docs-samples/firestore/src/get_all.php" data-region-tag="fs_get_all">get_all.php</a></div> </pre> </section> <section> <h5 id="unity_4" data-text="Unity">Unity</h5> <pre class="prettyprint" translate="no" dir="ltr"> CollectionReference usersRef = db.Collection("users"); usersRef.GetSnapshotAsync().ContinueWithOnMainThread(task => { QuerySnapshot snapshot = task.Result; foreach (DocumentSnapshot document in snapshot.Documents) { Debug.Log(String.Format("User: {0}", document.Id)); Dictionary<string, object> documentDictionary = document.ToDictionary(); Debug.Log(String.Format("First: {0}", documentDictionary["First"])); if (documentDictionary.ContainsKey("Middle")) { Debug.Log(String.Format("Middle: {0}", documentDictionary["Middle"])); } Debug.Log(String.Format("Last: {0}", documentDictionary["Last"])); Debug.Log(String.Format("Born: {0}", documentDictionary["Born"])); } Debug.Log("Read all data from the users collection."); }); </pre> </section> <section> <h5 id="c_4" data-text="C#">C#</h5> <pre class="prettyprint" translate="no" dir="ltr"> CollectionReference usersRef = db.Collection("users"); QuerySnapshot snapshot = await usersRef.GetSnapshotAsync(); foreach (DocumentSnapshot document in snapshot.Documents) { Console.WriteLine("User: {0}", document.Id); Dictionary<string, object> documentDictionary = document.ToDictionary(); Console.WriteLine("First: {0}", documentDictionary["First"]); if (documentDictionary.ContainsKey("Middle")) { Console.WriteLine("Middle: {0}", documentDictionary["Middle"]); } Console.WriteLine("Last: {0}", documentDictionary["Last"]); Console.WriteLine("Born: {0}", documentDictionary["Born"]); Console.WriteLine(); }<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/cc1a204b2dae56fe69c55b720b878898dedbf757/firestore/api/Quickstart/Program.cs#L79-L93" class="gc-analytics-event" data-category="github_link" data-label="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs#fs_get_all" data-code-snippet="true" data-github-path="GoogleCloudPlatform/dotnet-docs-samples/firestore/api/Quickstart/Program.cs" data-region-tag="fs_get_all">Program.cs</a></div> </pre> </section> <section> <h5 id="ruby_4" data-text="Ruby">Ruby</h5> <pre class="prettyprint" translate="no" dir="ltr"> users_ref = firestore.col collection_path users_ref.get do |user| puts "#{user.document_id} data: #{user.data}." end<div class="devsite-github-link nocode no-select"><a target="_top" href="https://web.archive.org/web/20210226045348/https://github.com/googleapis/google-cloud-ruby/blob/1373855d728f70a32c50f40f5e400b84d65a9798/google-cloud-firestore/samples/quickstart.rb#L70-L73" class="gc-analytics-event" data-category="github_link" data-label="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb#fs_get_all" data-code-snippet="true" data-github-path="googleapis/google-cloud-ruby/google-cloud-firestore/samples/quickstart.rb" data-region-tag="fs_get_all">quickstart.rb</a></div> </pre> </section> </div> <h2 id="secure_your_data" data-text="Secure your data">Secure your data</h2> <p>If you're using the Web, Android, or iOS SDK, use <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/docs/auth/">Firebase Authentication</a> and <a href="/web/20210226045348/https://firebase.google.com/docs/firestore/security/get-started">Cloud Firestore Security Rules</a> to secure your data in Cloud Firestore.</p> <p>Here are some basic rule sets you can use to get started. You can modify your security rules in the <a href="https://web.archive.org/web/20210226045348/https://console.firebase.google.com/project/_/firestore/rules"><strong>Rules tab</strong></a> of the console.</p> <div class="ds-selector-tabs" data-ds-scope="code-sample"> <section><h3 id="auth-required" data-text="Auth required">Auth required</h3><pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr">// Allow read/write access on all documents to any user signed in to the application service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth != null; } } } </code></pre></section> <section><h3 id="locked-mode" data-text="Locked mode">Locked mode</h3><pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr">// Deny read/write access to all users under any conditions service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if false; } } } </code></pre></section> <section><h3 id="test-mode" data-text="Test mode">Test mode</h3><pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr">// Allow read/write access to all users under any conditions // Warning: **NEVER** use this rule set in production; it allows // anyone to overwrite your entire database. service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if true; } } } </code></pre></section> </div> <p>If you're using one of the server SDKs, use <a href="https://web.archive.org/web/20210226045348/https://cloud.google.com/firestore/docs/security/iam">Identity and Access Management (IAM)</a> to secure your data in Cloud Firestore.</p> <h2 id="watch_a_video_tutorial" data-text="Watch a video tutorial">Watch a video tutorial</h2> <p>For detailed guidance on getting started with the Cloud Firestore mobile and web client libraries, watch one of the following video tutorials:</p> <div class="ds-selector-tabs" data-ds-scope="lang"> <section> <h3 id="web-v8_3" data-text="Web v8"><span class="two-line-tab"><span tab-label="Legacy">Web v8</span></span></h3> <iframe class="devsite-embedded-youtube-video" data-video-id="2Vf1D-rUMwE" width="560" height="315" data-autohide="1" data-showinfo="0" frameborder="0" allowfullscreen> </iframe> </section> <section> <h5 id="ios_1" data-text="iOS">iOS</h5> <iframe class="devsite-embedded-youtube-video" data-video-id="rvxYRm6n_NM" width="560" height="315" data-autohide="1" data-showinfo="0" frameborder="0" allowfullscreen> </iframe> </section> <section> <h5 id="android" data-text="Android">Android</h5> <iframe class="devsite-embedded-youtube-video" data-video-id="kDZYIhNkQoM" width="560" height="315" data-autohide="1" data-showinfo="0" frameborder="0" allowfullscreen> </iframe> </section> </div> <p>You can find more videos in the Firebase <a href="https://web.archive.org/web/20210226045348/https://www.youtube.com/firebase">YouTube channel</a>.</p> <h2 id="next_steps" data-text="Next steps">Next steps</h2> <p>Deepen your knowledge with the following topics:</p> <ul> <li><strong>Codelabs</strong> — Learn to use Cloud Firestore in a real app by following the codelab for <a href="https://web.archive.org/web/20210226045348/https://codelabs.developers.google.com/codelabs/firestore-android">Android</a>, <a href="https://web.archive.org/web/20210226045348/https://codelabs.developers.google.com/codelabs/firestore-ios">iOS</a>, or <a href="https://web.archive.org/web/20210226045348/https://codelabs.developers.google.com/codelabs/firestore-web">Web</a>.</li> <li><strong><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/data-model">Data model</a></strong> — Learn more about how data is structured in Cloud Firestore, including hierarchical data and subcollections.</li> <li><strong><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/manage-data/add-data">Add data</a></strong> — Learn more about creating and updating data in Cloud Firestore.</li> <li><strong><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/get-data">Get data</a></strong> — Learn more about how to retrieve data.</li> <li><strong><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/queries">Perform simple and compound queries</a></strong> — Learn how to run simple and compound queries.</li> <li><strong><a href="/web/20210226045348/https://firebase.google.com/docs/firestore/query-data/order-limit-data">Order and limit queries</a></strong> Learn how to order and limit the data returned by your queries.</li> </ul> </div> <devsite-page-rating position="footer" selected-rating="0" hover-rating-star="0"> </devsite-page-rating> <devsite-feedback position="footer" project-name="Firebase" product-id="719752" bucket="" context="" version="t-devsite-webserver-20210216-r02-rc00.433188149613609970" data-label="Send Feedback Button" track-type="feedback" track-name="sendFeedbackLink" track-metadata-position="footer" project-feedback-url="https://firebase.google.com/support/contact/bugs-features/" project-icon="https://firebase.google.com/_static/firebase/images/logo.png" project-support-url="https://firebase.google.com/support/" feedback-type="star-rating"> <button> Send feedback </button> </devsite-feedback> </article> <devsite-content-footer class="nocontent"> <p>Except as otherwise noted, the content of this page is licensed under the <a href="https://web.archive.org/web/20210226045348/https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 License</a>, and code samples are licensed under the <a href="https://web.archive.org/web/20210226045348/https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 License</a>. For details, see the <a href="https://web.archive.org/web/20210226045348/https://developers.google.com/site-policies">Google Developers Site Policies</a>. Java is a registered trademark of Oracle and/or its affiliates.</p> <p>Last updated 2021-02-23 UTC.</p> </devsite-content-footer> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Learn</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/guides/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)"> Guides </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/reference/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)"> Reference </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/samples/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)"> Samples </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/docs/libraries/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)"> Libraries </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://github.com/firebase/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)"> GitHub </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Stay connected</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://firebase.googleblog.com/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)"> Blog </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/summit/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)"> Firebase Summit </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://www.facebook.com/Firebase/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)"> Facebook </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://twitter.com/Firebase" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)"> Twitter </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://www.youtube.com/user/Firebase" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)"> YouTube </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Support</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/support/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)"> Contact support </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://stackoverflow.com/questions/tagged/firebase" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)"> Stack Overflow </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://firebase.community/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)"> Slack community </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//web.archive.org/web/20210226045348/https://groups.google.com/forum/#!forum/firebase-talk" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)"> Google group </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/support/releases" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)"> Release notes </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/web/20210226045348/https://firebase.google.com/support/faq/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)"> FAQs </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://web.archive.org/web/20210226045348/https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <img class="devsite-footer-sites-logo" src="https://web.archive.org/web/20210226045348im_/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/lockup-developers.svg" loading="lazy" alt="Google Developers"> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//web.archive.org/web/20210226045348/https://developer.android.com/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link"> Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//web.archive.org/web/20210226045348/https://developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link"> Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//web.archive.org/web/20210226045348/https://firebase.google.com/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link"> Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//web.archive.org/web/20210226045348/https://cloud.google.com/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link"> Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//web.archive.org/web/20210226045348/https://developers.google.com/products/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link"> All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/web/20210226045348/https://firebase.google.com/terms/" data-category="Site-Wide Custom Events" data-label="Footer Terms link"> Terms </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//web.archive.org/web/20210226045348/https://policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link"> Privacy </a> </li> </ul> <devsite-language-selector> <devsite-select class="devsite-language-selector-menu"> <select aria-label="Select your language preference." class="devsite-language-selector-select" name="language" track-name="click" track-type="languageSelector"> <option>Language</option> <option value="en" lang="en" track-metadata-original-language="en" track-metadata-selected-language="en" track-name="changed" track-type="languageSelector"> English </option> <option value="id" lang="id" track-metadata-original-language="en" track-metadata-selected-language="id" track-name="changed" track-type="languageSelector"> Bahasa Indonesia </option> <option value="de" lang="de" track-metadata-original-language="en" track-metadata-selected-language="de" track-name="changed" track-type="languageSelector"> Deutsch </option> <option value="es_419" lang="es_419" track-metadata-original-language="en" track-metadata-selected-language="es_419" track-name="changed" track-type="languageSelector"> Español – América Latina </option> <option value="fr" lang="fr" track-metadata-original-language="en" track-metadata-selected-language="fr" track-name="changed" track-type="languageSelector"> Français </option> <option value="it" lang="it" track-metadata-original-language="en" track-metadata-selected-language="it" track-name="changed" track-type="languageSelector"> Italiano </option> <option value="pl" lang="pl" track-metadata-original-language="en" track-metadata-selected-language="pl" track-name="changed" track-type="languageSelector"> Polski </option> <option value="pt_br" lang="pt_br" track-metadata-original-language="en" track-metadata-selected-language="pt_br" track-name="changed" track-type="languageSelector"> Português – Brasil </option> <option value="vi" lang="vi" track-metadata-original-language="en" track-metadata-selected-language="vi" track-name="changed" track-type="languageSelector"> Tiếng Việt </option> <option value="tr" lang="tr" track-metadata-original-language="en" track-metadata-selected-language="tr" track-name="changed" track-type="languageSelector"> Türkçe </option> <option value="ru" lang="ru" track-metadata-original-language="en" track-metadata-selected-language="ru" track-name="changed" track-type="languageSelector"> Русский </option> <option value="he" lang="he" track-metadata-original-language="en" track-metadata-selected-language="he" track-name="changed" track-type="languageSelector"> עברית' </option> <option value="ar" lang="ar" track-metadata-original-language="en" track-metadata-selected-language="ar" track-name="changed" track-type="languageSelector"> العربيّة </option> <option value="fa" lang="fa" track-metadata-original-language="en" track-metadata-selected-language="fa" track-name="changed" track-type="languageSelector"> فارسی </option> <option value="hi" lang="hi" track-metadata-original-language="en" track-metadata-selected-language="hi" track-name="changed" track-type="languageSelector"> हिंदी </option> <option value="bn" lang="bn" track-metadata-original-language="en" track-metadata-selected-language="bn" track-name="changed" track-type="languageSelector"> বাংলা </option> <option value="th" lang="th" track-metadata-original-language="en" track-metadata-selected-language="th" track-name="changed" track-type="languageSelector"> ภาษาไทย </option> <option value="zh_cn" lang="zh_cn" track-metadata-original-language="en" track-metadata-selected-language="zh_cn" track-name="changed" track-type="languageSelector"> 中文 – 简体 </option> <option value="zh_tw" lang="zh_tw" track-metadata-original-language="en" track-metadata-selected-language="zh_tw" track-name="changed" track-type="languageSelector"> 中文 – 繁體 </option> <option value="ja" lang="ja" track-metadata-original-language="en" track-metadata-selected-language="ja" track-name="changed" track-type="languageSelector"> 日本語 </option> <option value="ko" lang="ko" track-metadata-original-language="en" track-metadata-selected-language="ko" track-name="changed" track-type="languageSelector"> 한국어 </option> </select> </devsite-select> </devsite-language-selector> </nav> </div> </devsite-footer-utility> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics enable-analytics-iframe> <script type="application/json" analytics>[]</script> <script type="application/json" gtm>{"parameters": {"freeTrialEligibleUser": "False", "internalUser": "False", "language": {"machineTranslated": "False", "requested": "en", "served": "en"}, "pageType": "article", "projectName": "Firebase", "scriptsafe": null, "signedIn": "False", "tenant": "firebase"}, "tags": ["GTM-N84485"]}</script> </devsite-analytics> <devsite-badger></devsite-badger> <firebase-gtm></firebase-gtm> <script nonce="/a/1T4MvD+zopnZcpt54GVMtfcASnB"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://web.archive.org/web/20210226045348/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/js/app_loader.js', '[4,"en",null,"/js/devsite_app_module.js","https://web.archive.org/web/20210226045348/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c","https://web.archive.org/web/20210226045348/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase","https://web.archive.org/web/20210226045348/https://firebase-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/firebase/manifest.json","/_static/images/video-placeholder.svg","https://web.archive.org/web/20210226045348/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/favicon.png","https://web.archive.org/web/20210226045348/https://www.gstatic.com/devrel-devsite/prod/vbd904f2719533e871e3800dda1bebc56aa0bc95c3c9d01c4d7cebcf129bdf26c/firebase/images/lockup.png","https://web.archive.org/web/20210226045348/https://fonts.googleapis.com/css?family=Google+Sans:400,500|Roboto:400,400italic,500,500italic,700,700italic|Roboto+Mono:400,500,700|Material+Icons"],1,null,[1,6,8,12,14,17,21,25,40,50,63,70,75,76,80,87,88,91,92,93,97,98,100,101,102,103,105,107,108,111,113,115,116,117,118,120,122,125,129]]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html><!-- FILE ARCHIVED ON 04:53:48 Feb 26, 2021 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 14:48:56 Nov 25, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 1.209 exclusion.robots: 0.03 exclusion.robots.policy: 0.017 esindex: 0.009 cdx.remote: 15.451 LoadShardBlock: 206.951 (3) PetaboxLoader3.datanode: 142.154 (4) PetaboxLoader3.resolve: 218.738 (2) load_resource: 270.723 -->