Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(firestore): include metadata property on snapshot (#567) #707

Merged
merged 7 commits into from
Aug 30, 2024

Conversation

phjardas
Copy link
Contributor

I've created the Android implementation based on your proposed interface. I've removed the source option because it is only supported on the web platform and does not exist in the Android SDK.

The `source` option is only supported on the web platform and does not exist in
the Android SDK.
Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need to make changes to the FirebaseFirestorePlugin.java file.

packages/firestore/src/definitions.ts Outdated Show resolved Hide resolved
packages/firestore/src/web.ts Outdated Show resolved Hide resolved
packages/firestore/src/web.ts Outdated Show resolved Hide resolved
packages/firestore/src/web.ts Outdated Show resolved Hide resolved
@phjardas
Copy link
Contributor Author

Hope everything is right now. :-)

@phjardas phjardas changed the title Add Android, remove source option (#567) feat(firestore): include metadata property on snapshot (#567) Aug 28, 2024
@phjardas
Copy link
Contributor Author

I'll have a go at the iOS implementation this afternoon.

@robingenz
Copy link
Member

Please run npm run fmt to format your code.

Copy link

pkg-pr-new bot commented Aug 29, 2024

commit: 84be8d3

@capacitor-firebase/analytics

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/analytics@707

@capacitor-firebase/app

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/app@707

@capacitor-firebase/app-check

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/app-check@707

@capacitor-firebase/authentication

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/authentication@707

@capacitor-firebase/crashlytics

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/crashlytics@707

@capacitor-firebase/firestore

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/firestore@707

@capacitor-firebase/functions

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/functions@707

@capacitor-firebase/messaging

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/messaging@707

@capacitor-firebase/performance

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/performance@707

@capacitor-firebase/remote-config

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/remote-config@707

@capacitor-firebase/storage

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/storage@707

Open in Stackblitz

@robingenz
Copy link
Member

robingenz commented Aug 29, 2024

@phjardas LGTM! You want to push the ios implementation on this branch too?

@phjardas
Copy link
Contributor Author

@phjardas LGTM! You want to push the ios implementation on this branch too?

Yeah, let's hope I find time tomorrow. I've never worked with Swift or iOS before. 😬

@robingenz
Copy link
Member

Let me know if you have any questions. ;)

@phjardas
Copy link
Contributor Author

I just pushed the iOS implementation. It does build and verify, but I don't know how to actually test it.

Copy link
Member

@robingenz robingenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the actual iOS implementation in FirebaseFirestore.swift is missing.

@phjardas
Copy link
Contributor Author

Oops. 🙈 I've added the missing code. I still don't understand how I could actually test this plugin with my real capacitor app to verify everything's working now. Can you give me a pointer?

@robingenz
Copy link
Member

There are several ways to do this, the easiest is probably to simply use the pre-release, see https://github.com/capawesome-team/capacitor-firebase/runs/29462389318

npm i https://pkg.pr.new/capawesome-team/capacitor-firebase/@capacitor-firebase/firestore@84be8d3

@robingenz
Copy link
Member

Let me know as soon as you have tested it.

@phjardas
Copy link
Contributor Author

✅ Tested successfully in a live app on Web, Android and iOS.

@phjardas
Copy link
Contributor Author

phjardas commented Aug 30, 2024

BTW: this plugin and feature are used in rescuetablet.com ;-)

@robingenz
Copy link
Member

That's awesome! 😍 Thank you for sharing! If you ever plan to deliver Live Updates, I would love to welcome you to Capawesome Cloud (the only live update solution that is EU based & hosted). 😆

@robingenz robingenz merged commit 1d36da9 into capawesome-team:feat/issue-567 Aug 30, 2024
4 checks passed
@phjardas phjardas deleted the issue-567 branch August 30, 2024 08:50
@phjardas
Copy link
Contributor Author

Could you be so kind to soon make a patch release with this feature? 🙏🏻

We're currently using CapGo, and I'd rather not change the provider at this time. Unless you have very compelling arguments. 😜

robingenz added a commit that referenced this pull request Aug 30, 2024
* feat(firestore): include `metadata` property on snapshot

* docs

* feat(firestore): include metadata property on snapshot (#567) (#707)

* Add Android, remove `source` option

The `source` option is only supported on the web platform and does not exist in
the Android SDK.

* Revert omission of `source` option, complete Android implementation

* pr updates

* pr update

* format code

* Add iOS implementation

* Add iOS implementation

---------

Co-authored-by: Philipp Jardas <[email protected]>
@robingenz
Copy link
Member

Could you be so kind to soon make a patch release with this feature? 🙏🏻

Since all plugins are always updated at the same time, we wait until there are enough changes. Otherwise we would publish updates for 11 plugins for each change. ^^ I recommend that you use the pre-release until version 6.2.0 is published.

We're currently using CapGo, and I'd rather not change the provider at this time. Unless you have very compelling arguments. 😜

Feel free to reach out to me on LinkedIn. Maybe I can convince you. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants