Quellcode durchsuchen

Update availability specification

Peter Friese vor 6 Monaten
Ursprung
Commit
4587faac4f

+ 2 - 2
Firestore/Swift/Source/AsyncAwait/DocumentReference+AsyncSequence.swift

@@ -26,7 +26,7 @@ public extension DocumentReference {
   /// An asynchronous sequence of document snapshots.
   ///
   /// This stream emits a new `DocumentSnapshot` every time the underlying data changes.
-  @available(iOS 18.0, *)
+  @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
   var snapshots: some AsyncSequence<DocumentSnapshot, Error> {
     return snapshots(includeMetadataChanges: false)
   }
@@ -35,7 +35,7 @@ public extension DocumentReference {
   ///
   /// - Parameter includeMetadataChanges: Whether to receive events for metadata-only changes.
   /// - Returns: An `AsyncThrowingStream` of `DocumentSnapshot` events.
-  @available(iOS 18.0, *)
+  @available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
   func snapshots(includeMetadataChanges: Bool) -> some AsyncSequence<DocumentSnapshot, Error> {
     return AsyncThrowingStream { continuation in
       let listener = self

+ 1 - 1
Firestore/Swift/Tests/Unit/AsyncAwait/AsyncSequenceTests.swift

@@ -66,7 +66,7 @@ private class MockDocumentReference: DocumentReference {
 
 // MARK: - AsyncSequenceTests
 
-@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
+@available(macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0, *)
 class AsyncSequenceTests: XCTestCase {
   func testQuerySnapshotsYieldsValues() async throws {
     let mockQuery = MockQuery()