Send feedback
FirebaseFirestore Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
QuerySnapshotsSequence
@available ( macOS 15.0 , iOS 18.0 , watchOS 11.0 , tvOS 18.0 , visionOS 2.0 , * )
struct QuerySnapshotsSequence : AsyncSequence
An AsyncSequence that emits QuerySnapshot values whenever the query data changes.
This struct is the concrete type returned by the Query.snapshots property.
Declaration
Swift
@available ( macOS 15.0 , iOS 18.0 , watchOS 11.0 , tvOS 18.0 , visionOS 2.0 , * )
public typealias Failure = Error
Declaration
Swift
public typealias AsyncIterator = Iterator
Creates a new sequence for monitoring query snapshots.
Declaration
Swift
public init ( _ query : Query , includeMetadataChanges : Bool )
Parameters
query
The Query instance to monitor.
includeMetadataChanges
Whether to receive events for metadata-only changes.
Creates and returns an iterator for this asynchronous sequence.
Declaration
Swift
public func makeAsyncIterator () -> Iterator
Return Value
An Iterator for QuerySnapshotsSequence.
Declaration
Swift
@available ( macOS 15.0 , iOS 18.0 , watchOS 11.0 , tvOS 18.0 , visionOS 2.0 , * )
public struct Iterator : AsyncIteratorProtocol
extension Query . QuerySnapshotsSequence . Iterator : Sendable
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-28 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-05-28 UTC."],[],[]]