Starting with the 6.31.0 release, Firebase supports installation via Swift Package Manager in Beta status.
-ObjC linker option.If you've previously used CocoaPods, remove them from the project with pod deintegrate.
Install Firebase via Swift Package Manager:
Select the Firebase GitHub repository - https://github.com/firebase/firebase-ios-sdk.git:
Select the version.
Note: Prior to the 7.0.0 release, version selection is not available. Instead, the releases are available in branches with names like 6.34-spm-beta.
Note: The Swift Package Manager distribution continues to be in beta even though it now supports standard Swift Package Manager versioning.
Choose the Firebase products that you want installed in your app.
If you've installed FirebaseAnalytics, Add the -ObjC option to Other Linker Flags
in the Build Settings tab.
If you're using FirebaseAnalytics, Xcode 12.0, and have an issue with device installation or archive uploading, see the workaround at https://github.com/firebase/firebase-ios-sdk/issues/6472#issuecomment-694449182.
Package.swift manifestTo integrate via a Package.swift manifest instead of Xcode, you can add
Firebase to your dependencies array of your package with:
dependencies: [
// Substitute X.Y with the version of Firebase you want.
.package(name: "Firebase",
url: "https://github.com/firebase/firebase-ios-sdk.git",
.branch("X.Y-spm-beta")),
// Any other dependencies you have...
],
Then in any target that depends on a Firebase product, add it to the dependencies
array of that target:
.target(
name: "MyTargetName",
dependencies: [
// The product name you need. In this example, FirebaseAuth.
.product(name: "FirebaseAuth", package: "Firebase"),
]
),
Please provide any feedback via a GitHub Issue.
See current open Swift Package Manager issues here.




