Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can FirebaseFirestoreSwift be installed by the Swift Package Manager?

Tags:

ios

swift

It looks to me like FirebaseFirestoreSwift cannot be installed using the Swift Package Manager because FirebaseFirestoreSwift is still in beta.

I understand that FirebaseFirestoreSwift could be installed using Cocoapods but I don't want to use cocoapods because I believe (perhaps incorrectly) that source control using github with cocoapods can be challenging.

I want FirebaseFirestoreSwift because I believe that is the only way to get the SwiftUI codable protocol working with Firebase.

like image 734
gary Avatar asked Aug 31 '25 01:08

gary


1 Answers

Yes, FirebaseFirestoreSwift can be installed using SPM.

In your main dependencies, you'll want the main Firebase iOS SDK:

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

Then, the "FirebaseFirestoreSwift" can be used with the name "FirebaseFirestoreSwift-Beta" from the "Firebase" package:

//inside one of your target's dependencies:
.product(name: "FirebaseFirestoreSwift-Beta", package: "Firebase")
like image 114
jnpdx Avatar answered Sep 02 '25 15:09

jnpdx