React Native Firebase

repository·main·Indexed 11 days ago

https://github.com/invertase/react-native-firebase

A suite of modules that bridge React Native applications to native Firebase SDKs on iOS and Android. It provides native performance and TypeScript support with an API designed to mirror the Firebase Web SDK. Available modules include @react-native-firebase/app, auth, firestore, functions, messaging, analytics, ai, and more.

Tokens
223.8K
Snippets
676
Records
960
Agent score
93%

What's inside React Native Firebase

  1. Overview of Firebase AI Logic

    main
    Firebase AI Logic provides client-side access to Google's latest generative AI models (such as Gemini) directly from mobile apps. Unlike server-side implementations, these client SDKs are designed for mobile and web environments, providing security measures to prevent unauthorized client access and offering seamless integration with other Firebase services.
  2. Overview of React Native Firebase - Functions

    main
    The Cloud Functions for Firebase client SDKs allow you to call HTTPS Callable functions directly from your React Native application. To use this, you must first write and deploy an HTTPS Callable function in the Firebase Cloud Functions environment, then use the client SDK to invoke it from your app logic.
  3. Overview of React Native Firebase

    main

    React Native Firebase is a collection of official React Native modules that connect your application to Firebase services. Each module acts as a lightweight JavaScript layer that interfaces directly with the native Firebase SDKs for both iOS and Android.

    Key characteristics include:

    • Native Performance: Connects directly to native iOS and Android Firebase SDKs.
    • TypeScript Support: Provides first-class support for TypeScript.
    • Web SDK Parity: Designed to mirror the official Firebase Web SDK, allowing for high cross-platform code re-usability between React Native and Web applications.
    • Extensive Testing: Modules are extensively tested to ensure high reliability.
  4. Understand the React Native New Architecture migration status

    main

    The react-native-firebase library is undergoing a phased migration to the React Native New Architecture (TurboModules). The migration progress and package complexity are categorized into several tiers and phases.

    Package Categories

    • No native bridge: Packages that are pure JavaScript and do not require TurboModule migration (e.g., @react-native-firebase/ai, @react-native-firebase/vertexai).
    • Already migrated: Packages that have already transitioned to TurboModules (e.g., @react-native-firebase/functions).
    • Native packages: Packages requiring migration, categorized by complexity (Tier A to Tier D) based on their number of legacy modules, events, and methods.

    Migration Phases

    The migration follows a specific strategy: foundation → hard probe → easy wins → remaining complex → sync conversion → coordinated break → cleanup.

    Note: A coordinated major version release for consumers will occur once Phases 0–5, S, and R are complete. Phases C (EventEmitter cleanup) and E (Shared-state encapsulation) are optional post-break cleanup steps and do not gate the major release.

  5. App Check platform support and requirements

    main

    Platforms

    • Android: Supported via native Firebase SDK.
    • iOS: Supported via native Firebase SDK.

    New Architecture

    • Required from v26 onwards. See the migration guide for details.

    Attestation Providers

    Use ReactNativeFirebaseAppCheckProvider for native attestation.

    Note: The ReCaptchaEnterpriseProvider and ReCaptchaV3Provider from the firebase-js-sdk are web only and are not supported here.

  6. Platform support and New Architecture requirements

    main

    React Native Firebase supports Android and iOS using the native Firebase SDKs.

    Important Requirements:

    • New Architecture: As of version v26, the React Native New Architecture is required.
    • Async Initialization: The initializeApp method is asynchronous on React Native due to the native bridge.
    • Web-only methods: The registerVersion method is intended for web environments only and will throw an error on native Android or iOS platforms.