What are the differences between FirebaseFirestore and FirebaseFirestoreSwift?

Viewed 615

I know with FFS I can use @DocumentID and @ServerTimestamp in my Codable objects.

Is there documentation somewhere?

I found this answer to that question, but the answer just says "FirebaseFirestoreSwift is just a wrapper for Firestore"... but that's not accurate, as if I don't import FirebaseFirestoreSwift I can no longer user the attributes listed above.

1 Answers

I found this on cocoapods.org under the installation when researching the same question:

"Where available, it's recommended to install any libraries with a Swift suffix to get the best experience when writing your app in Swift."

https://cocoapods.org/pods/FirebaseFirestore#swift-package-manager

Specifically, FirestoreSwift adds async/await syntax, codable protocol, and property wrappers by utilizing Swift's language features. You can read the source here.

https://github.com/firebase/firebase-ios-sdk/tree/master/Firestore/Swift/Source

Peter Friese's blog is also very helpful when you use Firebase with Swift.

https://peterfriese.dev

Related