FirebaseFirestore Framework Reference

Iterator

@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
public struct Iterator : AsyncIteratorProtocol
extension DocumentReference.DocumentSnapshotsSequence.Iterator: Sendable

The asynchronous iterator for DocumentSnapshotsSequence.

  • Undocumented

    Declaration

    Swift

    public typealias Element = DocumentSnapshot
  • Produces the next element in the asynchronous sequence.

    Returns a DocumentSnapshot value or nil if the sequence has terminated. Throws an error if the underlying listener encounters an issue.

    Declaration

    Swift

    public mutating func next() async throws -> Element?

    Return Value

    An optional DocumentSnapshot object.