Swift Package Manager for Firebase
Starting with the 8.0.0 release, Firebase officially supports installation via Swift Package Manager.
Prior to version 8.0.0 (starting with version 6.31.0) support was in Beta.
- Requires Xcode 12.5 or above
- Analytics requires clients to add
- See Package.swift for supported platform versions.
- Product availability varies by platform. See the chart on this page for information on product availabilty for each platform.
If you've previously used CocoaPods, remove them from the project with
Installing from Xcode
Add a package by selecting
Add Packages… in Xcode’s menu bar.
Search for the Firebase Apple SDK using the repo's URL:
Next, set the Dependency Rule to be
Up to Next Major Version and specify
8.10.0 as the lower bound.
Then, select Add Package.
Choose the Firebase products that you want installed in your app.
If you've installed FirebaseAnalytics, add the
-ObjC option to
Other Linker Flags
Build Settings tab.
If you're using FirebaseCrashlytics, you can use
as the run script that allows Xcode to upload your project's dSYM files.
Another option is to use the
script. Place it in the directory where your
.xcodeproj file lives,
scripts/upload-symbols, and make sure that the file is executable:
chmod +x scripts/upload-symbols.
This script can be used to manually upload dSYM files (for usage notes and
additional instructions, run with the
Alternatively, add Firebase to a
To integrate via a
Package.swift manifest instead of Xcode, you can add
Firebase to the dependencies array of your package:
dependencies: [ .package( name: "Firebase", url: "https://github.com/firebase/firebase-ios-sdk.git", .upToNextMajor(from: "8.10.0") ), // Any other dependencies you have... ],
Then, in any target that depends on a Firebase product, add it to the
array of that target:
.target( name: "MyTargetName", dependencies: [ // The product(s) you want (e.g. FirebaseAuth). .product(name: "FirebaseAuth", package: "Firebase"), ] ),
Questions and Issues
Please provide any feedback via a GitHub Issue.
See current open Swift Package Manager issues here.