-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add AsyncStream support for Cloud Firestore #15363
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
base: main
Are you sure you want to change the base?
Conversation
This change introduces support for `AsyncSequence` to `DocumentReference` and `Query`, allowing developers to use `for await in` to receive real-time updates from Firestore. The implementation wraps the existing snapshot listener APIs in an `AsyncThrowingStream`, providing a modern, Swift-native way to work with real-time data. This change also includes unit tests for the new functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests don't appear to be running when I reproduced the xcodebuild job locally. I'm still debugging with the goal of adding a small SPM based unit test target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes proposed in #15518
Add AsyncSequence support for Firestore
This change introduces support for
AsyncSequencetoDocumentReferenceandQuery, allowing developers to usefor await into receive real-time updates from Firestore.The implementation wraps the existing snapshot listener APIs in an
AsyncThrowingStream, providing a modern, Swift-native way to work with real-time data.This change also includes unit tests for the new functionality.