DocumentSnapshotsSequence
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
struct DocumentSnapshotsSequence : AsyncSequenceAn AsyncSequence that emits DocumentSnapshot values whenever the document data changes.
This struct is the concrete type returned by the DocumentReference.snapshots property.
-
Declaration
Swift
public typealias Element = DocumentSnapshot -
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 document snapshots.
Declaration
Swift
public init(_ documentReference: DocumentReference, includeMetadataChanges: Bool)Parameters
documentReferenceThe
DocumentReferenceinstance to monitor.includeMetadataChangesWhether to receive events for metadata-only changes.
-
The asynchronous iterator for
DocumentSnapshotsSequence.Declaration
Swift
@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *) public struct Iterator : AsyncIteratorProtocolextension DocumentReference.DocumentSnapshotsSequence.Iterator: Sendable