Options to install Firebase in your Apple app

Swift Package Manager

Firebase recommends Swift Package Manager for new projects.

Via Xcode

Swift Package Manager support requires 16.2 or higher.

  1. If migrating from a CocoaPods-based project, runpod deintegrate to removeCocoaPods from your Xcode project. The CocoaPods-generated.xcworkspacefile can safely be deleted afterward. If you're adding Firebase to a projectfor the first time, this step can be ignored.

  2. In Xcode, install the Firebase libraries by navigating toFile > Add Packages.

  3. In the prompt that appears, select the Firebase GitHub repository:

    https://github.com/firebase/firebase-ios-sdk.git
  4. Select the version of Firebase you want to use. For new projects, werecommend using the newest version of Firebase.

  5. Choose the Firebase libraries you want to include in your app.

Once you're finished, Xcode will begin resolving your package dependencies anddownloading them in the background.

ViaPackage.swift

To integrate Firebase to a Swift package via aPackage.swift manifest, you canadd Firebase to thedependencies array of your package. For more details, seetheSwift Package Manager documentation.

dependencies:[.package(name:"Firebase",url:"https://github.com/firebase/firebase-ios-sdk.git",from:"8.0"),// ...],

Then in any target that depends on a Firebase product, add it to thedependencies array of that target.

.target(name:"MyTargetName",dependencies:[.product(name:"FirebaseAuth",package:"Firebase"),// ...]),

Product-specific considerations

Some Firebase products require extra integration steps in order to functioncorrectly.

Google Analytics

Google Analytics requires adding the-ObjC linker flag to your target'sbuild settings if included transitively.

Crashlytics

Crashlytics requires you to upload debug symbols.

You can use a run script build phase for Xcode to automatically upload debugsymbols post-build. Find the run script here:

${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run

Another option for uploading symbols is to use theupload-symbols script. Place the script in a subdirectory of your project file (for examplescripts/upload-symbols), then make sure that the script is executable:

chmod+xscripts/upload-symbols

This script can be used to manually upload dSYM files. For usage notesand additional instructions for the script, runupload-symbols without anyparameters.

CocoaPods

Firebase supports installation withCocoaPods in addition to Swift Package Manager.

Firebase's CocoaPods distribution requires Xcode 16.2 andCocoaPods 1.12.0 or higher. Here's how to installFirebase using CocoaPods:

  1. Create a Podfile if you don't already have one. From the root of yourproject directory, run the following command:

    pod init
    Note: Podfiles must includeuse_frameworks! (dynamic linking) oruse_frameworks! :linkage => :static; please see the documentation onlinking Firebase dependencies statically or dynamicallyfor more details.
  2. To your Podfile, add the Firebase pods that you want to use in your app.

    You can add any of thesupportedFirebase products to your app.

    Analytics enabled

    # Add the Firebase pod forGoogle Analyticspod 'FirebaseAnalytics'# ForAnalytics without IDFA collection capability, use this pod instead# pod FirebaseAnalytics/Core# Add the pods for any other Firebase products you want to use in your app# For example, to useFirebase Authentication andCloud Firestorepod 'FirebaseAuth'pod 'FirebaseFirestore'

    Learn more about IDFA, the device-level advertising identifier, in Apple'sUser Privacy and Data Use andApp Tracking Transparency documentation.

    Analytics not enabled

    # Add the pods for the Firebase products you want to use in your app# For example, to useFirebase Authentication andCloud Firestorepod 'FirebaseAuth'pod 'FirebaseFirestore'
    Binary Firebase dependencies are integrated as static frameworks by default. If you're using Firebase as a dependency of a dynamic framework, make sure you read the documentation aboutusing Firebase from a framework or a library.
  3. Install the pods, then open your.xcworkspace file to see the project inXcode:

    pod install --repo-update
    openyour-project.xcworkspace

Product-specific considerations

Some Firebase products require extra integration steps in order to functioncorrectly.

Crashlytics

Crashlytics requires you to upload debug symbols.

You can use a run script build phase for Xcode to automatically upload debugsymbols post-build. Find the run script here:

"${PODS_ROOT}/FirebaseCrashlytics/run"

Carthage

Carthage support is experimental. See theinstructions on GitHub for including Firebase in your app via Carthage.

Integrate manually

Firebase provides a pre-built binary XCFramework distribution for users who wantto integrate Firebase without using a dependency manager. To install Firebase:

  1. Download theframework SDK zip. This file contains architecture slicesfor all available target architectures for all Firebase SDKs and thus maytake some time to download.

  2. Unzip the file, then review theREADME for the frameworks that you want toinclude in your app.

  3. Add the-ObjC linkerflag in yourOther Linker Settings in your target's build settings.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-18 UTC.