akaffenberger / firebase-ios-sdk-xcframeworks

A small mirror for https://github.com/firebase/firebase-ios-sdk, to add support for binary (xcframework) distribution with swift package manager.
MIT License
134 stars 32 forks source link

Missing FirebaseFirestoreSwift product #16

Closed tylerjbarnes closed 2 years ago

tylerjbarnes commented 2 years ago

When pulling in the official Firebase package directly, there is a product called FirebaseFirestoreSwift available that adds support for the @DocumentID property wrapper, and Codable based write methods like .setData(from: Codable).

Would it be possible to include that product in this package?

akaffenberger commented 2 years ago

It appears the FirebaseFirestoreSwift product is not in the Github release archive (ie the Firebase.zip). However it might still be possible to workaround that using ZipBuilder. Theoretically the script could be modified to clone the repo, generate the missing binary via ZipBuilder and include it. I'd need to do some more investigating since I'm not familiar with the tooling.

tylerjbarnes commented 2 years ago

I see - thanks for the response! I'll look into the ZipBuilder option for manually bringing that in as a separate dependency. I see now that FirebaseFirestoreSwift is still marked as beta, so makes sense it wouldn't be in the release zip.

WillBishop commented 2 years ago

Is there any update to this? I'm trying to make sense of ZipBuilder, but if someone has done the work already that'd be awesome

(Maybe you'll now @tylerjbarnes?)

sejr commented 2 years ago

Wanted to follow up on this -- @akaffenberger I see FirebaseFirestoreSwift in the release assets for 9.0.0, but don't see it as a Package Product when I go to add this dependency?

(Also: you should add a tip jar or some way for us to say thanks for this -- super helpful!)

sejr commented 2 years ago

Looks like it's just included in FirebaseFirestore library as of 9.0.0!

With the fix for #26, I'm able to get everything running fine.

Screen Shot 2022-05-16 at 3 12 33 PM Screen Shot 2022-05-16 at 3 12 20 PM

Before and after on my build time in GH Actions. This is a {time, money, life}-saver 😄

akaffenberger commented 2 years ago

@sejr You are correct! As of 9.0.0 it's now an added dependency to the FirebaseFirestore target, so it should work out of the box.

To test (and for reference in case others need it), I added a quick Firestore example to this project, which uses the swift Codable features and @DocumentID property wrapper.

akaffenberger commented 2 years ago

@sejr Thank you for the tip jar recommendation! I added a link for it here: https://github.com/akaffenberger/buy-me-a-coffee