diff --git a/GRDB.swift.podspec b/GRDB.swift.podspec index 48182864d..de695d4af 100644 --- a/GRDB.swift.podspec +++ b/GRDB.swift.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = '13.0' s.osx.deployment_target = '10.13' s.watchos.deployment_target = '7.0' - s.tvos.deployment_target = '12.0' + s.tvos.deployment_target = '13.0' s.default_subspec = 'standard' s.subspec 'standard' do |ss| diff --git a/GRDB/Core/Database+Statements.swift b/GRDB/Core/Database+Statements.swift index f252a6bff..1b2806b3b 100644 --- a/GRDB/Core/Database+Statements.swift +++ b/GRDB/Core/Database+Statements.swift @@ -492,7 +492,7 @@ extension Database { // and throws the user-provided cancelled commit error. try observationBroker?.statementDidFail(statement) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { switch ResultCode(rawValue: resultCode) { case .SQLITE_INTERRUPT, .SQLITE_ABORT: if suspensionMutex.load().isCancelled { diff --git a/GRDB/Core/Database.swift b/GRDB/Core/Database.swift index 1d19d0302..f6574eeab 100644 --- a/GRDB/Core/Database.swift +++ b/GRDB/Core/Database.swift @@ -1199,7 +1199,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib /// will throw `CancellationError`, until `uncancel()` is called. /// /// This method can be called from any thread. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func cancel() { let needsInterrupt = suspensionMutex.withLock { suspension in if suspension.isCancelled { @@ -1216,7 +1216,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib } /// Undo `cancel()`. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func uncancel() { suspensionMutex.withLock { $0.isCancelled = false @@ -1320,7 +1320,7 @@ public final class Database: CustomStringConvertible, CustomDebugStringConvertib break case .cancel: - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { throw CancellationError() } else { // GRDB bug: cancellation is a Swift concurrency feature diff --git a/GRDB/Core/DatabasePool.swift b/GRDB/Core/DatabasePool.swift index de5c5f629..74a67b6c4 100644 --- a/GRDB/Core/DatabasePool.swift +++ b/GRDB/Core/DatabasePool.swift @@ -351,7 +351,7 @@ extension DatabasePool: DatabaseReader { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -436,7 +436,7 @@ extension DatabasePool: DatabaseReader { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -803,7 +803,7 @@ extension DatabasePool: DatabaseWriter { try writer.sync(updates) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func writeWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -820,7 +820,7 @@ extension DatabasePool: DatabaseWriter { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func barrierWriteWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { diff --git a/GRDB/Core/DatabasePublishers.swift b/GRDB/Core/DatabasePublishers.swift index a21777814..04ca12e84 100644 --- a/GRDB/Core/DatabasePublishers.swift +++ b/GRDB/Core/DatabasePublishers.swift @@ -1,5 +1,5 @@ #if canImport(Combine) /// A namespace for database Combine publishers. -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public enum DatabasePublishers { } #endif diff --git a/GRDB/Core/DatabaseQueue.swift b/GRDB/Core/DatabaseQueue.swift index 90f7c6fc1..ebf822667 100644 --- a/GRDB/Core/DatabaseQueue.swift +++ b/GRDB/Core/DatabaseQueue.swift @@ -233,7 +233,7 @@ extension DatabaseQueue: DatabaseReader { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -272,7 +272,7 @@ extension DatabaseQueue: DatabaseReader { try writer.sync(value) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -386,7 +386,7 @@ extension DatabaseQueue: DatabaseWriter { try writer.sync(updates) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func writeWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -398,7 +398,7 @@ extension DatabaseQueue: DatabaseWriter { try writer.sync(updates) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func barrierWriteWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { diff --git a/GRDB/Core/DatabaseReader.swift b/GRDB/Core/DatabaseReader.swift index d36fb3fd7..ed7736c6f 100644 --- a/GRDB/Core/DatabaseReader.swift +++ b/GRDB/Core/DatabaseReader.swift @@ -216,7 +216,7 @@ public protocol DatabaseReader: AnyObject, Sendable { /// - throws: Any ``DatabaseError`` that happens while establishing the /// database access, or the error thrown by `value`, or /// `CancellationError` if the task is cancelled. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T @@ -323,7 +323,7 @@ public protocol DatabaseReader: AnyObject, Sendable { /// - throws: Any ``DatabaseError`` that happens while establishing the /// database access, or the error thrown by `value`, or /// `CancellationError` if the task is cancelled. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T @@ -535,7 +535,7 @@ extension DatabaseReader { /// /// - parameter scheduler: A Combine Scheduler. /// - parameter value: A closure which accesses the database. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func readPublisher( receiveOn scheduler: some Combine.Scheduler = DispatchQueue.main, value: @escaping @Sendable (Database) throws -> Output @@ -550,7 +550,7 @@ extension DatabaseReader { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension DatabasePublishers { /// A publisher that reads from the database. /// @@ -569,7 +569,7 @@ extension DatabasePublishers { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Publisher where Failure == Error { fileprivate func eraseToReadPublisher() -> DatabasePublishers.Read { .init(upstream: eraseToAnyPublisher()) @@ -660,7 +660,7 @@ extension AnyDatabaseReader: DatabaseReader { try base.read(value) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -678,7 +678,7 @@ extension AnyDatabaseReader: DatabaseReader { try base.unsafeRead(value) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { diff --git a/GRDB/Core/DatabaseRegionObservation.swift b/GRDB/Core/DatabaseRegionObservation.swift index 15d9ba92c..4d5ab1193 100644 --- a/GRDB/Core/DatabaseRegionObservation.swift +++ b/GRDB/Core/DatabaseRegionObservation.swift @@ -128,7 +128,7 @@ extension DatabaseRegionObservation { } #if canImport(Combine) -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension DatabaseRegionObservation { // MARK: - Publishing Impactful Transactions @@ -140,7 +140,7 @@ extension DatabaseRegionObservation { /// /// Do not reschedule the publisher with `receive(on:options:)` or any /// `Publisher` method that schedules publisher elements. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func publisher(in writer: some DatabaseWriter) -> DatabasePublishers.DatabaseRegion { DatabasePublishers.DatabaseRegion(self, in: writer) } @@ -186,7 +186,7 @@ private class DatabaseRegionObserver: TransactionObserver { } #if canImport(Combine) -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension DatabasePublishers { /// A publisher that tracks transactions that modify a database region. /// diff --git a/GRDB/Core/DatabaseSnapshot.swift b/GRDB/Core/DatabaseSnapshot.swift index 9b8e9236d..36b131cea 100644 --- a/GRDB/Core/DatabaseSnapshot.swift +++ b/GRDB/Core/DatabaseSnapshot.swift @@ -151,7 +151,7 @@ extension DatabaseSnapshot: DatabaseSnapshotReader { try reader.sync(block) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -173,7 +173,7 @@ extension DatabaseSnapshot: DatabaseSnapshotReader { // We can't provide this as a default implementation in // `DatabaseSnapshotReader`, because of // . - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { diff --git a/GRDB/Core/DatabaseSnapshotPool.swift b/GRDB/Core/DatabaseSnapshotPool.swift index fb66e7910..826c7d0f6 100644 --- a/GRDB/Core/DatabaseSnapshotPool.swift +++ b/GRDB/Core/DatabaseSnapshotPool.swift @@ -293,7 +293,7 @@ extension DatabaseSnapshotPool: DatabaseSnapshotReader { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -353,7 +353,7 @@ extension DatabaseSnapshotPool: DatabaseSnapshotReader { // We can't provide this as a default implementation in // `DatabaseSnapshotReader`, because of // . - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { diff --git a/GRDB/Core/DatabaseWriter.swift b/GRDB/Core/DatabaseWriter.swift index f717f0c56..b1928b14a 100644 --- a/GRDB/Core/DatabaseWriter.swift +++ b/GRDB/Core/DatabaseWriter.swift @@ -131,7 +131,7 @@ public protocol DatabaseWriter: DatabaseReader { /// - throws: Any ``DatabaseError`` that happens while establishing the /// database access, or the error thrown by `updates`, or /// `CancellationError` if the task is cancelled. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func writeWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T @@ -217,7 +217,7 @@ public protocol DatabaseWriter: DatabaseReader { /// - throws: Any ``DatabaseError`` that happens while establishing the /// database access, or the error thrown by `updates`, or /// `CancellationError` if the task is cancelled. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func barrierWriteWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T @@ -649,7 +649,7 @@ extension DatabaseWriter { /// - throws: Any ``DatabaseError`` that happens while establishing the /// database access, or the error thrown by `updates`, or /// `CancellationError` if the task is cancelled. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func write( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -666,7 +666,7 @@ extension DatabaseWriter { /// Erase the database: delete all content, drop all tables, etc. /// /// - note: [**🔥 EXPERIMENTAL**](https://github.com/groue/GRDB.swift/blob/master/README.md#what-are-experimental-features) - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func erase() async throws { try await writeWithoutTransaction { try $0.erase() } } @@ -677,7 +677,7 @@ extension DatabaseWriter { /// - note: [**🔥 EXPERIMENTAL**](https://github.com/groue/GRDB.swift/blob/master/README.md#what-are-experimental-features) /// /// Related SQLite documentation: - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func vacuum() async throws { try await writeWithoutTransaction { try $0.execute(sql: "VACUUM") } } @@ -694,7 +694,7 @@ extension DatabaseWriter { /// Related SQLite documentation: /// /// - Parameter filePath: file path for new database - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func vacuum(into filePath: String) async throws { try await writeWithoutTransaction { try $0.execute(sql: "VACUUM INTO ?", arguments: [filePath]) @@ -709,7 +709,7 @@ extension DatabaseWriter { /// Related SQLite documentation: /// /// - Parameter filePath: file path for new database - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func vacuum(into filePath: String) async throws { try await writeWithoutTransaction { try $0.execute(sql: "VACUUM INTO ?", arguments: [filePath]) @@ -754,7 +754,7 @@ extension DatabaseWriter { /// /// - parameter scheduler: A Combine Scheduler. /// - parameter updates: A closure which accesses the database. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func writePublisher( receiveOn scheduler: some Combine.Scheduler = DispatchQueue.main, updates: @escaping @Sendable (Database) throws -> Output @@ -818,7 +818,7 @@ extension DatabaseWriter { /// - parameter scheduler: A Combine Scheduler. /// - parameter updates: A closure which writes in the database. /// - parameter value: A closure which reads from the database. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func writePublisher( receiveOn scheduler: some Combine.Scheduler = DispatchQueue.main, updates: @escaping @Sendable (Database) throws -> T, @@ -848,7 +848,7 @@ extension DatabaseWriter { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension DatabasePublishers { /// A publisher that writes into the database. /// @@ -867,7 +867,7 @@ extension DatabasePublishers { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Publisher where Failure == Error { fileprivate func eraseToWritePublisher() -> DatabasePublishers.Write { .init(upstream: self.eraseToAnyPublisher()) @@ -911,7 +911,7 @@ extension AnyDatabaseWriter: DatabaseReader { try base.read(value) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func read( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -929,7 +929,7 @@ extension AnyDatabaseWriter: DatabaseReader { try base.unsafeRead(value) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func unsafeRead( _ value: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -964,7 +964,7 @@ extension AnyDatabaseWriter: DatabaseWriter { try base.writeWithoutTransaction(updates) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func writeWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -976,7 +976,7 @@ extension AnyDatabaseWriter: DatabaseWriter { try base.barrierWriteWithoutTransaction(updates) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func barrierWriteWithoutTransaction( _ updates: @escaping @Sendable (Database) throws -> T ) async throws -> T { diff --git a/GRDB/Core/SerializedDatabase.swift b/GRDB/Core/SerializedDatabase.swift index 6a64e4012..666836011 100644 --- a/GRDB/Core/SerializedDatabase.swift +++ b/GRDB/Core/SerializedDatabase.swift @@ -244,7 +244,7 @@ final class SerializedDatabase { } /// Asynchrously executes the block. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func execute( _ block: @escaping @Sendable (Database) throws -> T ) async throws -> T { @@ -309,7 +309,7 @@ extension SerializedDatabase: @unchecked Sendable { } // MARK: - Task Cancellation Support -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) enum DatabaseAccessCancellationState: @unchecked Sendable { // @unchecked Sendable because database is only accessed from its // dispatch queue. @@ -319,7 +319,7 @@ enum DatabaseAccessCancellationState: @unchecked Sendable { case expired } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) typealias CancellableDatabaseAccess = Mutex /// Supports Task cancellation in async database accesses. @@ -341,7 +341,7 @@ typealias CancellableDatabaseAccess = Mutex /// } /// } /// ``` -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension CancellableDatabaseAccess: DatabaseCancellable { convenience init() { self.init(.notConnected) diff --git a/GRDB/Dump/DumpFormats/JSONDumpFormat.swift b/GRDB/Dump/DumpFormats/JSONDumpFormat.swift index a3a036e5b..f24eaa121 100644 --- a/GRDB/Dump/DumpFormats/JSONDumpFormat.swift +++ b/GRDB/Dump/DumpFormats/JSONDumpFormat.swift @@ -52,7 +52,7 @@ public struct JSONDumpFormat: Sendable { public static var defaultEncoder: JSONEncoder { // This encoder MUST NOT CHANGE, because some people rely on this format. let encoder = JSONEncoder() - if #available(macOS 10.15, tvOS 13.0, *) { + if #available(macOS 10.15.0, *) { encoder.outputFormatting = .withoutEscapingSlashes } encoder.nonConformingFloatEncodingStrategy = .convertToString( diff --git a/GRDB/Fixits.swift b/GRDB/Fixits.swift index 42b768ce8..453741c45 100644 --- a/GRDB/Fixits.swift +++ b/GRDB/Fixits.swift @@ -119,7 +119,7 @@ extension PersistableRecord { public func performSave(_ db: Database) throws { preconditionFailure() } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension QueryInterfaceRequest where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible { @available(*, unavailable, message: "selectID() has been removed. You may use selectPrimaryKey(as:) instead.") public func selectID() -> QueryInterfaceRequest { preconditionFailure() } @@ -144,13 +144,13 @@ extension SelectionRequest { @available(*, unavailable, renamed: "SQLExpression.AssociativeBinaryOperator") public typealias SQLAssociativeBinaryOperator = SQLExpression.AssociativeBinaryOperator -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible { @available(*, unavailable, message: "selectID() has been removed. You may use selectPrimaryKey(as:) instead.") public func selectID() -> QueryInterfaceRequest { preconditionFailure() } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { @available(*, unavailable, message: "selectID() has been removed. You may use selectPrimaryKey(as:) instead.") public static func selectID() -> QueryInterfaceRequest { preconditionFailure() } diff --git a/GRDB/Migration/DatabaseMigrator.swift b/GRDB/Migration/DatabaseMigrator.swift index 1e8b6ce2f..11c2ae92e 100644 --- a/GRDB/Migration/DatabaseMigrator.swift +++ b/GRDB/Migration/DatabaseMigrator.swift @@ -496,7 +496,7 @@ extension DatabaseMigrator { /// - parameter writer: A DatabaseWriter. /// where migrations should apply. /// - parameter scheduler: A Combine Scheduler. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func migratePublisher( _ writer: some DatabaseWriter, receiveOn scheduler: some Combine.Scheduler = DispatchQueue.main) @@ -514,7 +514,7 @@ extension DatabaseMigrator { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension DatabasePublishers { /// A publisher that migrates a database. /// diff --git a/GRDB/QueryInterface/Request/QueryInterfaceRequest.swift b/GRDB/QueryInterface/Request/QueryInterfaceRequest.swift index 8f747ff3b..ab6a1047a 100644 --- a/GRDB/QueryInterface/Request/QueryInterfaceRequest.swift +++ b/GRDB/QueryInterface/Request/QueryInterfaceRequest.swift @@ -646,7 +646,7 @@ extension QueryInterfaceRequest { /// - parameter db: A database connection. /// - returns: A set of deleted ids. /// - throws: A ``DatabaseError`` whenever an SQLite error occurs. - @available(macOS 10.15, tvOS 13, *) // Identifiable + @available(macOS 10.15, *) // Identifiable public func deleteAndFetchIds(_ db: Database) throws -> Set where RowDecoder: TableRecord & Identifiable, diff --git a/GRDB/QueryInterface/Request/RequestProtocols.swift b/GRDB/QueryInterface/Request/RequestProtocols.swift index 9a51e8701..c265069f9 100644 --- a/GRDB/QueryInterface/Request/RequestProtocols.swift +++ b/GRDB/QueryInterface/Request/RequestProtocols.swift @@ -631,7 +631,7 @@ extension TableRequest where Self: FilteredRequest, Self: TypedRequest { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension TableRequest where Self: FilteredRequest, Self: TypedRequest, diff --git a/GRDB/QueryInterface/SQL/Table.swift b/GRDB/QueryInterface/SQL/Table.swift index 3e7dd8180..cdaf32b85 100644 --- a/GRDB/QueryInterface/SQL/Table.swift +++ b/GRDB/QueryInterface/SQL/Table.swift @@ -722,7 +722,7 @@ extension Table { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible { /// Returns a request filtered by primary key. /// @@ -1545,7 +1545,7 @@ extension Table { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible @@ -1686,7 +1686,7 @@ extension Table { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Table where RowDecoder: Identifiable, RowDecoder.ID: DatabaseValueConvertible diff --git a/GRDB/QueryInterface/Schema/TableAlteration.swift b/GRDB/QueryInterface/Schema/TableAlteration.swift index f10919b23..9b40a2d62 100644 --- a/GRDB/QueryInterface/Schema/TableAlteration.swift +++ b/GRDB/QueryInterface/Schema/TableAlteration.swift @@ -129,7 +129,6 @@ public final class TableAlteration { /// /// - parameter name: the old name of the column. /// - parameter newName: the new name of the column. - @available(tvOS 13, *) // SQLite 3.25+ public func rename(column name: String, to newName: String) { _rename(column: name, to: newName) } diff --git a/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift b/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift index ce98f1772..fa9acff66 100644 --- a/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift +++ b/GRDB/QueryInterface/TableRecord+QueryInterfaceRequest.swift @@ -604,7 +604,7 @@ extension TableRecord { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Returns a request filtered by primary key. /// diff --git a/GRDB/Record/FetchableRecord+TableRecord.swift b/GRDB/Record/FetchableRecord+TableRecord.swift index ed006713e..18ea1eeb2 100644 --- a/GRDB/Record/FetchableRecord+TableRecord.swift +++ b/GRDB/Record/FetchableRecord+TableRecord.swift @@ -216,7 +216,7 @@ extension FetchableRecord where Self: TableRecord { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension FetchableRecord where Self: TableRecord & Identifiable, ID: DatabaseValueConvertible { // MARK: Fetching by Single-Column Primary Key @@ -358,7 +358,7 @@ extension FetchableRecord where Self: TableRecord & Hashable { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension FetchableRecord where Self: TableRecord & Hashable & Identifiable, ID: DatabaseValueConvertible { /// Returns a set of records identified by their primary keys. /// diff --git a/GRDB/Record/TableRecord.swift b/GRDB/Record/TableRecord.swift index cf53d3462..46794444f 100644 --- a/GRDB/Record/TableRecord.swift +++ b/GRDB/Record/TableRecord.swift @@ -319,7 +319,7 @@ extension TableRecord { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Returns whether a record exists for this primary key. /// @@ -454,7 +454,7 @@ extension TableRecord { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Deletes records identified by their primary keys, and returns the number /// of deleted records. @@ -774,7 +774,7 @@ extension TableRecord where Self: EncodableRecord { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension TableRecord where Self: Identifiable, ID: DatabaseValueConvertible { /// Returns an error for a record that does not exist in the database. /// diff --git a/GRDB/Utils/OnDemandFuture.swift b/GRDB/Utils/OnDemandFuture.swift index 03b2ad08c..e91d8af44 100644 --- a/GRDB/Utils/OnDemandFuture.swift +++ b/GRDB/Utils/OnDemandFuture.swift @@ -17,7 +17,7 @@ import Foundation /// /// OnDemandFuture also adds Sendable requirements that avoid /// compiler warnings. -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) struct OnDemandFuture: Publisher { typealias Promise = @Sendable (Result) -> Void typealias Output = Output @@ -36,7 +36,7 @@ struct OnDemandFuture: Publisher { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) private class OnDemandFutureSubscription: Subscription, @unchecked Sendable { // @unchecked because `state` is protected with `lock`. typealias Promise = @Sendable (Result) -> Void diff --git a/GRDB/Utils/ReceiveValuesOn.swift b/GRDB/Utils/ReceiveValuesOn.swift index 95fb42fe0..5a309e1f5 100644 --- a/GRDB/Utils/ReceiveValuesOn.swift +++ b/GRDB/Utils/ReceiveValuesOn.swift @@ -11,7 +11,7 @@ import Foundation /// This scheduling guarantee is used by GRDB in order to be able /// to make promises on the scheduling of database values without surprising /// the users as in . -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) struct ReceiveValuesOn: Publisher { typealias Output = Upstream.Output typealias Failure = Upstream.Failure @@ -30,7 +30,7 @@ struct ReceiveValuesOn: Publisher { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) private class ReceiveValuesOnSubscription: Subscription, Subscriber where Upstream: Publisher, @@ -211,7 +211,7 @@ where } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Publisher { /// Specifies the scheduler on which to receive values from the publisher /// diff --git a/GRDB/ValueObservation/SharedValueObservation.swift b/GRDB/ValueObservation/SharedValueObservation.swift index 6f6175009..925a67a2c 100644 --- a/GRDB/ValueObservation/SharedValueObservation.swift +++ b/GRDB/ValueObservation/SharedValueObservation.swift @@ -292,7 +292,7 @@ public final class SharedValueObservation: @unchecked Sendabl /// print("fresh players: \(players)") /// } /// ``` - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func publisher() -> DatabasePublishers.Value { DatabasePublishers.Value { onError, onChange in self.start(onError: onError, onChange: onChange) @@ -369,7 +369,7 @@ extension SharedValueObservation { /// print("Fresh players: \(players)") /// } /// ``` - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func values(bufferingPolicy: AsyncValueObservation.BufferingPolicy = .unbounded) -> AsyncValueObservation { diff --git a/GRDB/ValueObservation/ValueObservation.swift b/GRDB/ValueObservation/ValueObservation.swift index b4236838b..84d9eda00 100644 --- a/GRDB/ValueObservation/ValueObservation.swift +++ b/GRDB/ValueObservation/ValueObservation.swift @@ -179,7 +179,7 @@ extension ValueObservation: Refinable { /// - parameter onChange: The closure to execute on receipt of a /// fresh value. /// - returns: A DatabaseCancellable that can stop the observation. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) @preconcurrency @MainActor public func start( in reader: some DatabaseReader, scheduling scheduler: some ValueObservationMainActorScheduler = .mainActor, @@ -350,7 +350,7 @@ extension ValueObservation { /// fresh values are dispatched on the cooperative thread pool. /// - parameter bufferingPolicy: see the documntation /// of `AsyncThrowingStream`. - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func values( in reader: some DatabaseReader, scheduling scheduler: some ValueObservationScheduler = .task, @@ -386,7 +386,7 @@ extension ValueObservation { /// /// You build an `AsyncValueObservation` from ``ValueObservation`` or /// ``SharedValueObservation``. -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public struct AsyncValueObservation: AsyncSequence { public typealias BufferingPolicy = AsyncThrowingStream.Continuation.BufferingPolicy public typealias AsyncIterator = Iterator @@ -488,7 +488,7 @@ extension ValueObservation { /// - parameter scheduler: A ValueObservationScheduler. By default, fresh /// values are dispatched asynchronously on the main dispatch queue. /// - returns: A Combine publisher - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) public func publisher( in reader: some DatabaseReader, scheduling scheduler: some ValueObservationScheduler = .async(onQueue: .main)) @@ -505,7 +505,7 @@ extension ValueObservation { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension DatabasePublishers { /// A publisher that publishes the values of a ``ValueObservation``. /// diff --git a/GRDB/ValueObservation/ValueObservationScheduler.swift b/GRDB/ValueObservation/ValueObservationScheduler.swift index 5188d3452..887ce09cf 100644 --- a/GRDB/ValueObservation/ValueObservationScheduler.swift +++ b/GRDB/ValueObservation/ValueObservationScheduler.swift @@ -182,7 +182,7 @@ extension ValueObservationMainActorScheduler where Self == ImmediateValueObserva // MARK: - TaskValueObservationScheduler /// A scheduler that notifies all values on the cooperative thread pool. -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public final class TaskValueObservationScheduler: ValueObservationScheduler { typealias Action = @Sendable () -> Void let continuation: AsyncStream.Continuation @@ -212,7 +212,7 @@ public final class TaskValueObservationScheduler: ValueObservationScheduler { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension ValueObservationScheduler where Self == TaskValueObservationScheduler { /// A scheduler that notifies all values from a new `Task`. public static var task: TaskValueObservationScheduler { @@ -229,7 +229,7 @@ extension ValueObservationScheduler where Self == TaskValueObservationScheduler // MARK: - DelayedMainActorValueObservationScheduler /// A scheduler that notifies all values on the cooperative thread pool. -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public final class DelayedMainActorValueObservationScheduler: ValueObservationMainActorScheduler { public func immediateInitialValue() -> Bool { false @@ -240,7 +240,7 @@ public final class DelayedMainActorValueObservationScheduler: ValueObservationMa } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension ValueObservationScheduler where Self == DelayedMainActorValueObservationScheduler { /// A scheduler that notifies all values on the main actor. public static var mainActor: DelayedMainActorValueObservationScheduler { diff --git a/Package.swift b/Package.swift index af1aace2f..6b53e53ff 100644 --- a/Package.swift +++ b/Package.swift @@ -38,7 +38,7 @@ let package = Package( platforms: [ .iOS(.v13), .macOS(.v10_13), - .tvOS(.v12), + .tvOS(.v13), .watchOS(.v7), ], products: [ diff --git a/README.md b/README.md index be3bff834..530e3d309 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ **Latest release**: September 7, 2024 • [version 6.29.3](https://github.com/groue/GRDB.swift/tree/v6.29.3) • [CHANGELOG](CHANGELOG.md) • [Migrating From GRDB 5 to GRDB 6](Documentation/GRDB6MigrationGuide.md) -**Requirements**: iOS 13.0+ / macOS 10.13+ / tvOS 12.0+ / watchOS 7.0+ • SQLite 3.19.3+ • Swift 6+ / Xcode 16+ +**Requirements**: iOS 13.0+ / macOS 10.13+ / tvOS 13.0+ / watchOS 7.0+ • SQLite 3.19.3+ • Swift 6+ / Xcode 16+ **Contact**: diff --git a/SQLiteCustom/GRDBDeploymentTarget.xcconfig b/SQLiteCustom/GRDBDeploymentTarget.xcconfig index 8f02cc893..369f90a51 100644 --- a/SQLiteCustom/GRDBDeploymentTarget.xcconfig +++ b/SQLiteCustom/GRDBDeploymentTarget.xcconfig @@ -1,6 +1,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.0 MACOSX_DEPLOYMENT_TARGET = 10.13 -TVOS_DEPLOYMENT_TARGET = 12.0 +TVOS_DEPLOYMENT_TARGET = 13.0 WATCHOS_DEPLOYMENT_TARGET = 7.0 SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES OTHER_SWIFT_FLAGS = $(inherited) -enable-upcoming-feature GlobalActorIsolatedTypesUsability diff --git a/Support/GRDBDeploymentTarget.xcconfig b/Support/GRDBDeploymentTarget.xcconfig index d20702f0c..a457235ee 100644 --- a/Support/GRDBDeploymentTarget.xcconfig +++ b/Support/GRDBDeploymentTarget.xcconfig @@ -1,6 +1,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 13.0 MACOSX_DEPLOYMENT_TARGET = 10.13 -TVOS_DEPLOYMENT_TARGET = 12.0 +TVOS_DEPLOYMENT_TARGET = 13.0 WATCHOS_DEPLOYMENT_TARGET = 7.0 OTHER_SWIFT_FLAGS = $(inherited) -D SQLITE_ENABLE_FTS5 SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES = YES diff --git a/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift b/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift index 51198282b..7c8656f35 100644 --- a/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift +++ b/Tests/CombineExpectations/PublisherExpectations/AvailableElements.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation which waits for the timeout to expire, or /// the recorded publisher to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Finished.swift b/Tests/CombineExpectations/PublisherExpectations/Finished.swift index c9d1c8a6b..6c773f4f3 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Finished.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Finished.swift @@ -17,7 +17,7 @@ import XCTest // try wait(for: recorder.finished.inverted, timeout: 1) // } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher /// to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Inverted.swift b/Tests/CombineExpectations/PublisherExpectations/Inverted.swift index ceb59955e..218402af6 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Inverted.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Inverted.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation that fails if the base expectation is fulfilled. /// diff --git a/Tests/CombineExpectations/PublisherExpectations/Map.swift b/Tests/CombineExpectations/PublisherExpectations/Map.swift index e15e6607e..2f55cc60e 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Map.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Map.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation that transforms the value of a base expectation. /// @@ -20,7 +20,7 @@ extension PublisherExpectations { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectation { /// Returns a publisher expectation that transforms the value of the /// base expectation. diff --git a/Tests/CombineExpectations/PublisherExpectations/Next.swift b/Tests/CombineExpectations/PublisherExpectations/Next.swift index 3fd8010dd..8d511ccd8 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Next.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Next.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher to emit /// `count` elements, or to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/NextOne.swift b/Tests/CombineExpectations/PublisherExpectations/NextOne.swift index 492c2ba3b..6d4869a5c 100644 --- a/Tests/CombineExpectations/PublisherExpectations/NextOne.swift +++ b/Tests/CombineExpectations/PublisherExpectations/NextOne.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher to emit /// one element, or to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Prefix.swift b/Tests/CombineExpectations/PublisherExpectations/Prefix.swift index 3f055e128..3089272c9 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Prefix.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Prefix.swift @@ -1,7 +1,7 @@ #if canImport(Combine) import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher to emit /// `maxLength` elements, or to complete. diff --git a/Tests/CombineExpectations/PublisherExpectations/Recording.swift b/Tests/CombineExpectations/PublisherExpectations/Recording.swift index 0b88ae273..59bd76c1b 100644 --- a/Tests/CombineExpectations/PublisherExpectations/Recording.swift +++ b/Tests/CombineExpectations/PublisherExpectations/Recording.swift @@ -2,7 +2,7 @@ import Combine import XCTest -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// A publisher expectation which waits for the recorded publisher /// to complete. diff --git a/Tests/CombineExpectations/Recorder.swift b/Tests/CombineExpectations/Recorder.swift index 569066dbb..153f328a5 100644 --- a/Tests/CombineExpectations/Recorder.swift +++ b/Tests/CombineExpectations/Recorder.swift @@ -13,7 +13,7 @@ import XCTest /// /// let elements = try wait(for: recorder.elements, timeout: 1) /// XCTAssertEqual(elements, ["foo", "bar", "baz"]) -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public class Recorder: Subscriber { public typealias Input = Input public typealias Failure = Failure @@ -287,7 +287,7 @@ public class Recorder: Subscriber { // MARK: - Publisher Expectations -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension PublisherExpectations { /// The type of the publisher expectation returned by `Recorder.completion`. public typealias Completion = Map, Subscribers.Completion> @@ -302,7 +302,7 @@ extension PublisherExpectations { public typealias Single = Map, Input> } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Recorder { /// Returns a publisher expectation which waits for the timeout to expire, /// or the recorded publisher to complete. @@ -584,7 +584,7 @@ extension Recorder { // MARK: - Publisher + Recorder -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Publisher { /// Returns a subscribed Recorder. /// diff --git a/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift b/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift index b45baff0e..79defbd8c 100644 --- a/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift +++ b/Tests/GRDBCombineTests/DatabaseReaderReadPublisherTests.swift @@ -22,7 +22,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -128,7 +128,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // frame #71: 0x00007fff72311cc9 libdyld.dylib`start + 1 // frame #72: 0x00007fff72311cc9 libdyld.dylib`start + 1 func testReadPublisherError() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -157,7 +157,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherIsAsynchronous() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -197,7 +197,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherDefaultScheduler() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -237,7 +237,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherCustomScheduler() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -278,7 +278,7 @@ class DatabaseReaderReadPublisherTests : XCTestCase { // MARK: - func testReadPublisherIsReadonly() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift b/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift index 1a91d0c93..10a3568b8 100644 --- a/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift +++ b/Tests/GRDBCombineTests/DatabaseRegionObservationPublisherTests.swift @@ -20,7 +20,7 @@ private struct Player: Codable, FetchableRecord, PersistableRecord { class DatabaseRegionObservationPublisherTests : XCTestCase { func testChangesNotifications() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -61,7 +61,7 @@ class DatabaseRegionObservationPublisherTests : XCTestCase { // TODO: do the same, but asynchronously. If this is too hard, update the // public API so that users can easily do it. func testPrependInitialDatabaseSync() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift b/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift index 585359af2..d9534238c 100644 --- a/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift +++ b/Tests/GRDBCombineTests/DatabaseWriterWritePublisherTests.swift @@ -22,7 +22,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -49,7 +49,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherValue() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -76,7 +76,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherError() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -99,7 +99,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { } func testWritePublisherErrorRollbacksTransaction() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -132,7 +132,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherIsAsynchronous() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -168,7 +168,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherDefaultScheduler() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -206,7 +206,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWritePublisherCustomScheduler() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -247,7 +247,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // TODO: Fix flaky test with both pool and on-disk queue: // - Expectation timeout func testWriteThenReadPublisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -274,7 +274,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWriteThenReadPublisherIsReadonly() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -299,7 +299,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // MARK: - func testWriteThenReadPublisherWriteError() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -322,7 +322,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { } func testWriteThenReadPublisherWriteErrorRollbacksTransaction() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -359,7 +359,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // TODO: Fix flaky test with both pool and on-disk queue: // - Expectation timeout func testWriteThenReadPublisherReadError() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -386,7 +386,7 @@ class DatabaseWriterWritePublisherTests : XCTestCase { // Regression test against deadlocks created by concurrent completion // and cancellations triggered by .switchToLatest().prefix(1) func testDeadlockPrevention() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBCombineTests/Support.swift b/Tests/GRDBCombineTests/Support.swift index 3759c94fa..678195909 100644 --- a/Tests/GRDBCombineTests/Support.swift +++ b/Tests/GRDBCombineTests/Support.swift @@ -51,7 +51,7 @@ final class Test { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) final class AsyncTest { // Raise the repeatCount in order to help spotting flaky tests. private let repeatCount: Int @@ -100,7 +100,7 @@ final class AsyncTest { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public func assertNoFailure( _ completion: Subscribers.Completion, file: StaticString = #file, @@ -111,7 +111,7 @@ public func assertNoFailure( } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public func assertFailure( _ completion: Subscribers.Completion, file: StaticString = #file, diff --git a/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift b/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift index 86c98fa66..ae89d3f27 100644 --- a/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift +++ b/Tests/GRDBCombineTests/ValueObservationPublisherTests.swift @@ -22,7 +22,7 @@ class ValueObservationPublisherTests : XCTestCase { // MARK: - Default Scheduler func testDefaultSchedulerChangesNotifications() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -64,7 +64,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDefaultSchedulerFirstValueIsEmittedAsynchronously() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -97,7 +97,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDefaultSchedulerError() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -123,7 +123,7 @@ class ValueObservationPublisherTests : XCTestCase { // MARK: - Immediate Scheduler func testImmediateSchedulerChangesNotifications() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -165,7 +165,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testImmediateSchedulerEmitsFirstValueSynchronously() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -201,7 +201,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testImmediateSchedulerError() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -226,7 +226,7 @@ class ValueObservationPublisherTests : XCTestCase { // MARK: - Demand - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) private class DemandSubscriber: Subscriber { private var subscription: Subscription? let subject = PassthroughSubject() @@ -257,7 +257,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandNoneReceivesNoElement() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -292,7 +292,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandOneReceivesOneElement() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -330,7 +330,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandOneDoesNotReceiveTwoElements() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -372,7 +372,7 @@ class ValueObservationPublisherTests : XCTestCase { } func testDemandTwoReceivesTwoElements() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -418,7 +418,7 @@ class ValueObservationPublisherTests : XCTestCase { /// Regression test for https://github.com/groue/GRDB.swift/issues/1194 func testIssue1194() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBTests/AsyncSemaphore.swift b/Tests/GRDBTests/AsyncSemaphore.swift index 3ac88d495..cc6dd6109 100644 --- a/Tests/GRDBTests/AsyncSemaphore.swift +++ b/Tests/GRDBTests/AsyncSemaphore.swift @@ -43,7 +43,7 @@ import Foundation /// /// - ``wait()`` /// - ``waitUnlessCancelled()`` -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) public final class AsyncSemaphore: @unchecked Sendable { /// `Suspension` is the state of a task waiting for a signal. /// diff --git a/Tests/GRDBTests/DatabaseDataEncodingStrategyTests.swift b/Tests/GRDBTests/DatabaseDataEncodingStrategyTests.swift index 20061cebe..58d33c758 100644 --- a/Tests/GRDBTests/DatabaseDataEncodingStrategyTests.swift +++ b/Tests/GRDBTests/DatabaseDataEncodingStrategyTests.swift @@ -25,7 +25,7 @@ private struct RecordWithData: EncodableRecord, Enco var data: Data } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension RecordWithData: Identifiable { var id: Data { data } } @@ -37,7 +37,7 @@ private struct RecordWithOptionalData: EncodableReco var data: Data? } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension RecordWithOptionalData: Identifiable { var id: Data? { data } } @@ -154,7 +154,7 @@ extension DatabaseDataEncodingStrategyTests { } func testFilterID() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable not available") } @@ -234,7 +234,7 @@ extension DatabaseDataEncodingStrategyTests { } func testDeleteID() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable not available") } diff --git a/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift b/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift index a071a7ddb..0f8b7629e 100644 --- a/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift +++ b/Tests/GRDBTests/DatabaseDateEncodingStrategyTests.swift @@ -52,7 +52,7 @@ private struct RecordWithDate: EncodableRecord, Enco var date: Date } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension RecordWithDate: Identifiable { var id: Date { date } } @@ -64,7 +64,7 @@ private struct RecordWithOptionalDate: EncodableReco var date: Date? } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension RecordWithOptionalDate: Identifiable { var id: Date? { date } } @@ -264,7 +264,7 @@ extension DatabaseDateEncodingStrategyTests { } func testFilterID() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable not available") } @@ -344,7 +344,7 @@ extension DatabaseDateEncodingStrategyTests { } func testDeleteID() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable not available") } diff --git a/Tests/GRDBTests/DatabaseDumpTests.swift b/Tests/GRDBTests/DatabaseDumpTests.swift index 425f1f4e6..f05da9916 100644 --- a/Tests/GRDBTests/DatabaseDumpTests.swift +++ b/Tests/GRDBTests/DatabaseDumpTests.swift @@ -238,7 +238,7 @@ final class DatabaseDumpTests: GRDBTestCase { // MARK: - JSON func test_json_value_formatting() throws { - guard #available(macOS 10.15, tvOS 13.0, *) else { + guard #available(macOS 10.15.0, *) else { throw XCTSkip("Skip because this test relies on JSONEncoder.OutputFormatting.withoutEscapingSlashes") } diff --git a/Tests/GRDBTests/DatabaseMigratorTests.swift b/Tests/GRDBTests/DatabaseMigratorTests.swift index 114e9743c..700ad3381 100644 --- a/Tests/GRDBTests/DatabaseMigratorTests.swift +++ b/Tests/GRDBTests/DatabaseMigratorTests.swift @@ -41,7 +41,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testEmptyMigratorPublisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -153,7 +153,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testNonEmptyMigratorPublisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -209,7 +209,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testEmptyMigratorPublisherIsAsynchronous() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -235,7 +235,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testNonEmptyMigratorPublisherIsAsynchronous() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -262,7 +262,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testMigratorPublisherDefaultScheduler() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -291,7 +291,7 @@ class DatabaseMigratorTests : GRDBTestCase { } func testMigratorPublisherCustomScheduler() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } diff --git a/Tests/GRDBTests/DatabaseReaderTests.swift b/Tests/GRDBTests/DatabaseReaderTests.swift index 5428c2270..d7ebdb9e1 100644 --- a/Tests/GRDBTests/DatabaseReaderTests.swift +++ b/Tests/GRDBTests/DatabaseReaderTests.swift @@ -49,7 +49,7 @@ class DatabaseReaderTests : GRDBTestCase { #endif } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_ReadCanRead() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -91,7 +91,7 @@ class DatabaseReaderTests : GRDBTestCase { #endif } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_ReadPreventsDatabaseModification() async throws { func test(_ dbReader: some DatabaseReader) async throws { do { @@ -135,7 +135,7 @@ class DatabaseReaderTests : GRDBTestCase { #endif } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_UnsafeReadCanRead() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -347,7 +347,7 @@ class DatabaseReaderTests : GRDBTestCase { // MARK: - Task Cancellation - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_read_is_cancelled_by_Task_cancellation_performed_before_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -383,7 +383,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_read_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -420,7 +420,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_statement_execution_from_read_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -459,7 +459,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_cursor_iteration_from_read_is_interrupted_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -502,7 +502,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_unsafeRead_is_cancelled_by_Task_cancellation_performed_before_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -538,7 +538,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_unsafeRead_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -575,7 +575,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_statement_execution_from_unsafeRead_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -614,7 +614,7 @@ class DatabaseReaderTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_cursor_iteration_from_unsafeRead_is_interrupted_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbReader: some DatabaseReader) async throws { let semaphore = AsyncSemaphore(value: 0) diff --git a/Tests/GRDBTests/DatabaseRegionObservationTests.swift b/Tests/GRDBTests/DatabaseRegionObservationTests.swift index 3f91a54fc..49d76f9eb 100644 --- a/Tests/GRDBTests/DatabaseRegionObservationTests.swift +++ b/Tests/GRDBTests/DatabaseRegionObservationTests.swift @@ -9,7 +9,7 @@ class DatabaseRegionObservationTests: GRDBTestCase { _ = observation.start(in: writer, onError: { _ in }, onChange: { _ in }) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { _ = observation.publisher(in: writer) } } diff --git a/Tests/GRDBTests/DatabaseSnapshotPoolTests.swift b/Tests/GRDBTests/DatabaseSnapshotPoolTests.swift index c839451c0..3a3e26c2c 100644 --- a/Tests/GRDBTests/DatabaseSnapshotPoolTests.swift +++ b/Tests/GRDBTests/DatabaseSnapshotPoolTests.swift @@ -229,7 +229,7 @@ final class DatabaseSnapshotPoolTests: GRDBTestCase { try XCTAssertEqual(dbPool.read(counter.value), 2) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_read_async() async throws { let dbPool = try makeDatabasePool() let counter = try Counter(dbPool: dbPool) // 0 diff --git a/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift b/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift index 7fb74781b..119953a1b 100644 --- a/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift +++ b/Tests/GRDBTests/DatabaseUUIDEncodingStrategyTests.swift @@ -26,7 +26,7 @@ private struct RecordWithUUID: EncodableRecord, Enco var uuid: UUID } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension RecordWithUUID: Identifiable { var id: UUID { uuid } } @@ -39,7 +39,7 @@ private struct RecordWithOptionalUUID: EncodableReco var uuid: UUID? } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension RecordWithOptionalUUID: Identifiable { var id: UUID? { uuid } } @@ -190,7 +190,7 @@ extension DatabaseUUIDEncodingStrategyTests { } func testFilterID() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable not available") } @@ -309,7 +309,7 @@ extension DatabaseUUIDEncodingStrategyTests { } func testDeleteID() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable not available") } diff --git a/Tests/GRDBTests/DatabaseWriterTests.swift b/Tests/GRDBTests/DatabaseWriterTests.swift index 62b5c3e6f..5d4f9e965 100644 --- a/Tests/GRDBTests/DatabaseWriterTests.swift +++ b/Tests/GRDBTests/DatabaseWriterTests.swift @@ -275,7 +275,7 @@ class DatabaseWriterTests : GRDBTestCase { try DatabaseQueue().backup(to: dbQueue) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_write() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -295,7 +295,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(setup(makeDatabasePool())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_writeWithoutTransaction() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -318,7 +318,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(setup(makeDatabasePool())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_barrierWriteWithoutTransaction() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -341,7 +341,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(setup(makeDatabasePool())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_erase() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -359,7 +359,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(setup(makeDatabasePool())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_vacuum() async throws { func setup(_ dbWriter: T) throws -> T { try dbWriter.write { db in @@ -406,7 +406,7 @@ class DatabaseWriterTests : GRDBTestCase { } /// A test related to - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncWriteThenRead() async throws { /// An async read performed after an async write should see the write. func test(_ dbWriter: some DatabaseWriter) async throws { @@ -430,7 +430,7 @@ class DatabaseWriterTests : GRDBTestCase { // MARK: - Task Cancellation - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_writeWithoutTransaction_is_cancelled_by_Task_cancellation_performed_before_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -461,7 +461,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_writeWithoutTransaction_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -493,7 +493,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_statement_execution_from_writeWithoutTransaction_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -527,7 +527,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_cursor_iteration_from_writeWithoutTransaction_is_interrupted_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -565,7 +565,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_write_is_cancelled_by_Task_cancellation_performed_before_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -596,7 +596,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_write_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -628,7 +628,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_statement_execution_from_write_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -662,7 +662,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_cursor_iteration_from_write_is_interrupted_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -700,7 +700,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_barrierWriteWithoutTransaction_is_cancelled_by_Task_cancellation_performed_before_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -731,7 +731,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_barrierWriteWithoutTransaction_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -763,7 +763,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_statement_execution_from_barrierWriteWithoutTransaction_is_cancelled_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) @@ -797,7 +797,7 @@ class DatabaseWriterTests : GRDBTestCase { try await test(AnyDatabaseWriter(makeDatabaseQueue())) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_cursor_iteration_from_barrierWriteWithoutTransaction_is_interrupted_by_Task_cancellation_performed_after_database_access() async throws { func test(_ dbWriter: some DatabaseWriter) async throws { let semaphore = AsyncSemaphore(value: 0) diff --git a/Tests/GRDBTests/JoinSupportTests.swift b/Tests/GRDBTests/JoinSupportTests.swift index a3a5c9974..e67523fbf 100644 --- a/Tests/GRDBTests/JoinSupportTests.swift +++ b/Tests/GRDBTests/JoinSupportTests.swift @@ -92,7 +92,7 @@ private struct FlatModel: FetchableRecord { self.t5count = row.scopes[Scopes.suffix]!["t5count"] } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) static func modernAll() -> some FetchRequest { all() } @@ -138,7 +138,7 @@ private struct CodableFlatModel: FetchableRecord, Codable { var t3: T3? var t5count: Int - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) static func modernAll() -> some FetchRequest { all() } @@ -186,7 +186,7 @@ private struct CodableNestedModel: FetchableRecord, Codable { var t3: T3? var t5count: Int - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) static func modernAll() -> some FetchRequest { all() } diff --git a/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift b/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift index 64762126b..d3c598488 100644 --- a/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift +++ b/Tests/GRDBTests/RecordMinimalNonOptionalPrimaryKeySingleTests.swift @@ -41,7 +41,7 @@ private class MinimalNonOptionalPrimaryKeySingle: Record, Hashable { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension MinimalNonOptionalPrimaryKeySingle: Identifiable { } class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { @@ -473,7 +473,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [String] = [] let cursor = try MinimalNonOptionalPrimaryKeySingle.fetchCursor(db, ids: ids) @@ -512,7 +512,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.fetchAll(db, ids: ids) @@ -550,7 +550,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.fetchSet(db, ids: ids) @@ -585,7 +585,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"id\" = '\(record.id)'") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try MinimalNonOptionalPrimaryKeySingle.fetchOne(db, id: record.id)! XCTAssertTrue(fetchedRecord.id == record.id) @@ -613,7 +613,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"id\" = '\(record.id)'") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { _ = try MinimalNonOptionalPrimaryKeySingle.find(db, key: "missing") XCTFail("Expected RecordError") @@ -653,7 +653,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [String] = [] let cursor = try MinimalNonOptionalPrimaryKeySingle.filter(ids: ids).fetchCursor(db) @@ -692,7 +692,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.filter(ids: ids).fetchAll(db) @@ -730,7 +730,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.id }), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [String] = [] let fetchedRecords = try MinimalNonOptionalPrimaryKeySingle.filter(ids: ids).fetchSet(db) @@ -765,7 +765,7 @@ class RecordMinimalNonOptionalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"id\" = '\(record.id)'") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try MinimalNonOptionalPrimaryKeySingle.filter(id: record.id).fetchOne(db)! XCTAssertTrue(fetchedRecord.id == record.id) diff --git a/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift b/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift index 31c1d684f..9b4dc9187 100644 --- a/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift +++ b/Tests/GRDBTests/RecordMinimalPrimaryKeyRowIDTests.swift @@ -45,7 +45,7 @@ class MinimalRowID : Record, Hashable { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension MinimalRowID: Identifiable { } class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { @@ -507,7 +507,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let cursor = try MinimalRowID.fetchCursor(db, ids: ids) @@ -546,7 +546,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.fetchAll(db, ids: ids) @@ -584,7 +584,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.fetchSet(db, ids: ids) @@ -619,7 +619,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalRowIDs\" WHERE \"id\" = \(record.id!)") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try MinimalRowID.fetchOne(db, id: record.id!)! XCTAssertTrue(fetchedRecord.id == record.id) @@ -650,7 +650,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalRowIDs\" WHERE \"id\" = \(record.id!)") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { _ = try MinimalRowID.find(db, id: -1) XCTFail("Expected RecordError") @@ -693,7 +693,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let cursor = try MinimalRowID.filter(ids: ids).fetchCursor(db) @@ -732,7 +732,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.filter(ids: ids).fetchAll(db) @@ -770,7 +770,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try MinimalRowID.filter(ids: ids).fetchSet(db) @@ -805,7 +805,7 @@ class RecordMinimalPrimaryKeyRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalRowIDs\" WHERE \"id\" = \(record.id!)") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try MinimalRowID.filter(id: record.id!).fetchOne(db)! XCTAssertTrue(fetchedRecord.id == record.id) diff --git a/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift b/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift index 0e3eb7fd4..28e0a5913 100644 --- a/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift +++ b/Tests/GRDBTests/RecordMinimalPrimaryKeySingleTests.swift @@ -39,7 +39,7 @@ class MinimalSingle: Record, Hashable { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension MinimalSingle: Identifiable { /// Test non-optional ID type var id: String { UUID! } @@ -531,7 +531,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let UUIDs: [String] = [] let cursor = try MinimalSingle.fetchCursor(db, ids: UUIDs) @@ -572,7 +572,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.fetchAll(db, ids: UUIDs) @@ -612,7 +612,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.fetchSet(db, ids: UUIDs) @@ -648,7 +648,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"UUID\" = '\(record.UUID!)'") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try MinimalSingle.fetchOne(db, id: record.UUID!)! XCTAssertTrue(fetchedRecord.UUID == record.UUID) @@ -677,7 +677,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"UUID\" = '\(record.UUID!)'") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { _ = try MinimalSingle.find(db, id: "missing") XCTFail("Expected RecordError") @@ -719,7 +719,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let UUIDs: [String] = [] let cursor = try MinimalSingle.filter(ids: UUIDs).fetchCursor(db) @@ -760,7 +760,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.filter(ids: UUIDs).fetchAll(db) @@ -800,7 +800,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map { $0.UUID! }), Set(UUIDs)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let UUIDs: [String] = [] let fetchedRecords = try MinimalSingle.filter(ids: UUIDs).fetchSet(db) @@ -836,7 +836,7 @@ class RecordMinimalPrimaryKeySingleTests: GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT * FROM \"minimalSingles\" WHERE \"UUID\" = '\(record.UUID!)'") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try MinimalSingle.filter(id: record.UUID!).fetchOne(db)! XCTAssertTrue(fetchedRecord.UUID == record.UUID) diff --git a/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift b/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift index 398f2d990..b16e2fc3f 100644 --- a/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift +++ b/Tests/GRDBTests/RecordPrimaryKeyHiddenRowIDTests.swift @@ -77,7 +77,7 @@ private class Person : Record, Hashable { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Person: Identifiable { } class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { @@ -599,7 +599,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let cursor = try Person.fetchCursor(db, ids: ids) @@ -638,7 +638,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.fetchAll(db, ids: ids) @@ -676,7 +676,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.fetchSet(db, ids: ids) @@ -714,7 +714,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT *, \"rowid\" FROM \"persons\" WHERE \"rowid\" = \(record.id!)") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try Person.fetchOne(db, id: record.id!)! XCTAssertTrue(fetchedRecord.id == record.id) @@ -751,7 +751,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT *, \"rowid\" FROM \"persons\" WHERE \"rowid\" = \(record.id!)") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { _ = try Person.find(db, id: -1) XCTFail("Expected RecordError") @@ -797,7 +797,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertTrue(try cursor.next() == nil) // end } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let cursor = try Person.filter(ids: ids).fetchCursor(db) @@ -836,7 +836,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.filter(ids: ids).fetchAll(db) @@ -874,7 +874,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(Set(fetchedRecords.map(\.id)), Set(ids)) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let ids: [Int64] = [] let fetchedRecords = try Person.filter(ids: ids).fetchSet(db) @@ -912,7 +912,7 @@ class RecordPrimaryKeyHiddenRowIDTests : GRDBTestCase { XCTAssertEqual(lastSQLQuery, "SELECT *, \"rowid\" FROM \"persons\" WHERE \"rowid\" = \(record.id!)") } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { do { let fetchedRecord = try Person.filter(id: record.id!).fetchOne(db)! XCTAssertTrue(fetchedRecord.id == record.id) diff --git a/Tests/GRDBTests/SharedValueObservationTests.swift b/Tests/GRDBTests/SharedValueObservationTests.swift index 4a61b1bb1..f794c5906 100644 --- a/Tests/GRDBTests/SharedValueObservationTests.swift +++ b/Tests/GRDBTests/SharedValueObservationTests.swift @@ -120,7 +120,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_immediate_publisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -397,7 +397,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_async_publisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -525,7 +525,7 @@ class SharedValueObservationTests: GRDBTestCase { XCTAssertEqual(log.flush(), []) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_task_observationLifetime() throws { let dbQueue = try makeDatabaseQueue() try dbQueue.write { db in @@ -622,7 +622,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_task_publisher() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -656,7 +656,7 @@ class SharedValueObservationTests: GRDBTestCase { } #endif - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func test_task_whileObserved() throws { let dbQueue = try makeDatabaseQueue() try dbQueue.write { db in @@ -753,7 +753,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_error_recovery_observationLifetime() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -811,7 +811,7 @@ class SharedValueObservationTests: GRDBTestCase { #if canImport(Combine) func test_error_recovery_whileObserved() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Combine is not available") } @@ -867,7 +867,7 @@ class SharedValueObservationTests: GRDBTestCase { } #endif - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_mainQueue() async throws { let dbQueue = try makeDatabaseQueue() try await dbQueue.write { db in @@ -887,7 +887,7 @@ class SharedValueObservationTests: GRDBTestCase { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_task() async throws { let dbQueue = try makeDatabaseQueue() try await dbQueue.write { db in diff --git a/Tests/GRDBTests/TableDefinitionTests.swift b/Tests/GRDBTests/TableDefinitionTests.swift index 26b7ba31b..12b666ca1 100644 --- a/Tests/GRDBTests/TableDefinitionTests.swift +++ b/Tests/GRDBTests/TableDefinitionTests.swift @@ -805,11 +805,6 @@ class TableDefinitionTests: GRDBTestCase { guard sqlite3_libversion_number() >= 3025000 else { throw XCTSkip("ALTER TABLE RENAME COLUMN is not available") } - #if !GRDBCUSTOMSQLITE && !GRDBCIPHER - guard #available(tvOS 13, *) else { - throw XCTSkip("ALTER TABLE RENAME COLUMN is not available") - } - #endif let dbQueue = try makeDatabaseQueue() try dbQueue.inDatabase { db in try db.create(table: "test") { t in @@ -833,11 +828,6 @@ class TableDefinitionTests: GRDBTestCase { guard sqlite3_libversion_number() >= 3025000 else { throw XCTSkip("ALTER TABLE RENAME COLUMN is not available") } - #if !GRDBCUSTOMSQLITE && !GRDBCIPHER - guard #available(tvOS 13, *) else { - throw XCTSkip("ALTER TABLE RENAME COLUMN is not available") - } - #endif let dbQueue = try makeDatabaseQueue() try dbQueue.inDatabase { db in try db.create(table: "test") { t in diff --git a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift index 0c28204e8..4021373d5 100644 --- a/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift +++ b/Tests/GRDBTests/TableRecord+QueryInterfaceRequestTests.swift @@ -357,7 +357,7 @@ class TableRecordQueryInterfaceRequestTests: GRDBTestCase { } func testExistsIdentifiable() throws { - guard #available(macOS 10.15, tvOS 13, *) else { + guard #available(macOS 10.15, *) else { throw XCTSkip("Identifiable is not available") } diff --git a/Tests/GRDBTests/TableRecordDeleteTests.swift b/Tests/GRDBTests/TableRecordDeleteTests.swift index eb1b3f479..7dedbab24 100644 --- a/Tests/GRDBTests/TableRecordDeleteTests.swift +++ b/Tests/GRDBTests/TableRecordDeleteTests.swift @@ -6,7 +6,7 @@ private struct Hacker : TableRecord { var id: Int64? // Optional } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Hacker: Identifiable { } private struct Person : Codable, PersistableRecord, FetchableRecord, Hashable { @@ -16,7 +16,7 @@ private struct Person : Codable, PersistableRecord, FetchableRecord, Hashable { var email: String } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Person: Identifiable { } private struct Citizenship : TableRecord { @@ -46,7 +46,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertTrue(deleted) XCTAssertEqual(try Hacker.fetchCount(db), 0) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { try db.execute(sql: "INSERT INTO hackers (rowid, name) VALUES (?, ?)", arguments: [1, "Arthur"]) try XCTAssertFalse(Hacker.deleteOne(db, id: nil)) deleted = try Hacker.deleteOne(db, id: 1) @@ -62,7 +62,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertEqual(deletedCount, 2) XCTAssertEqual(try Hacker.fetchCount(db), 1) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { try db.execute(sql: "INSERT INTO hackers (rowid, name) VALUES (?, ?)", arguments: [2, "Barbara"]) try db.execute(sql: "INSERT INTO hackers (rowid, name) VALUES (?, ?)", arguments: [3, "Craig"]) let deletedCount = try Hacker.deleteAll(db, ids: [2, 3, 4]) @@ -85,7 +85,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertTrue(deleted) XCTAssertEqual(try Person.fetchCount(db), 0) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { try db.execute(sql: "INSERT INTO persons (id, name, email) VALUES (?, ?, ?)", arguments: [1, "Arthur", "arthur@example.com"]) deleted = try Person.deleteOne(db, id: 1) XCTAssertTrue(deleted) @@ -100,7 +100,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertEqual(deletedCount, 2) XCTAssertEqual(try Person.fetchCount(db), 1) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { try db.execute(sql: "INSERT INTO persons (id, name, email) VALUES (?, ?, ?)", arguments: [2, "Barbara", "barbara@example.com"]) try db.execute(sql: "INSERT INTO persons (id, name, email) VALUES (?, ?, ?)", arguments: [3, "Craig", "craig@example.com"]) let deletedCount = try Person.deleteAll(db, ids: [2, 3, 4]) @@ -190,7 +190,7 @@ class TableRecordDeleteTests: GRDBTestCase { try Person.filter(keys: [1, 2]).deleteAll(db) XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" IN (1, 2)") - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { try Person.filter(id: 1).deleteAll(db) XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" = 1") @@ -279,7 +279,7 @@ class TableRecordDeleteTests: GRDBTestCase { XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" IN (1, 2) RETURNING *") #if GRDBCUSTOMSQLITE || GRDBCIPHER - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { _ = try Person.filter(id: 1).deleteAndFetchCursor(db).next() XCTAssertEqual(self.lastSQLQuery, "DELETE FROM \"persons\" WHERE \"id\" = 1 RETURNING *") @@ -364,7 +364,7 @@ class TableRecordDeleteTests: GRDBTestCase { } } - @available(macOS 10.15, tvOS 13, *) // Identifiable + @available(macOS 10.15, *) // Identifiable func testRequestDeleteAndFetchIds() throws { #if GRDBCUSTOMSQLITE || GRDBCIPHER guard sqlite3_libversion_number() >= 3035000 else { diff --git a/Tests/GRDBTests/TableRecordUpdateTests.swift b/Tests/GRDBTests/TableRecordUpdateTests.swift index b5a249eb8..787c1fb47 100644 --- a/Tests/GRDBTests/TableRecordUpdateTests.swift +++ b/Tests/GRDBTests/TableRecordUpdateTests.swift @@ -17,7 +17,7 @@ private struct Player: Codable, PersistableRecord, FetchableRecord, Hashable { } } -@available(macOS 10.15, tvOS 13, *) +@available(macOS 10.15, *) extension Player: Identifiable { } private enum Columns: String, ColumnExpression { @@ -56,7 +56,7 @@ class TableRecordUpdateTests: GRDBTestCase { UPDATE "player" SET "score" = 0 WHERE "id" IN (1, 2) """) - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { try Player.filter(id: 1).updateAll(db, assignment) XCTAssertEqual(self.lastSQLQuery, """ UPDATE "player" SET "score" = 0 WHERE "id" = 1 diff --git a/Tests/GRDBTests/TableTests.swift b/Tests/GRDBTests/TableTests.swift index 7576902fd..34f732b5f 100644 --- a/Tests/GRDBTests/TableTests.swift +++ b/Tests/GRDBTests/TableTests.swift @@ -117,7 +117,7 @@ class TableTests: GRDBTestCase { """) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { struct Player: Identifiable { var id: Int64 } let t = Table("player") @@ -129,7 +129,7 @@ class TableTests: GRDBTestCase { """) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { struct Player: Identifiable { var id: Int64? } let t = Table("player") @@ -806,7 +806,7 @@ class TableTests: GRDBTestCase { """) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { // Non-optional ID struct Country: Identifiable { var id: String } @@ -821,7 +821,7 @@ class TableTests: GRDBTestCase { """) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { // Optional ID struct Country: Identifiable { var id: String? } @@ -920,7 +920,7 @@ class TableTests: GRDBTestCase { """) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { // Non-optional ID struct Country: Identifiable { var id: String } @@ -930,7 +930,7 @@ class TableTests: GRDBTestCase { """) } - if #available(macOS 10.15, tvOS 13, *) { + if #available(macOS 10.15, *) { // Optional ID struct Country: Identifiable { var id: String? } diff --git a/Tests/GRDBTests/ValueObservationRegionRecordingTests.swift b/Tests/GRDBTests/ValueObservationRegionRecordingTests.swift index dff05d4c5..0e3ae4432 100644 --- a/Tests/GRDBTests/ValueObservationRegionRecordingTests.swift +++ b/Tests/GRDBTests/ValueObservationRegionRecordingTests.swift @@ -105,7 +105,7 @@ class ValueObservationRegionRecordingTests: GRDBTestCase { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testTupleObservation() throws { // Here we just test that user can destructure an observed tuple. // I'm completely paranoid about tuple destructuring - I can't wrap my @@ -120,7 +120,7 @@ class ValueObservationRegionRecordingTests: GRDBTestCase { onChange: { (int: Int, string: String) in }) // <- destructure } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testVaryingRegionTrackingImmediateScheduling() throws { let dbQueue = try makeDatabaseQueue() try dbQueue.write { diff --git a/Tests/GRDBTests/ValueObservationTests.swift b/Tests/GRDBTests/ValueObservationTests.swift index 142ce7249..c72b90c5e 100644 --- a/Tests/GRDBTests/ValueObservationTests.swift +++ b/Tests/GRDBTests/ValueObservationTests.swift @@ -5,7 +5,7 @@ import Dispatch class ValueObservationTests: GRDBTestCase { // Test passes if it compiles. // See - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testStartFromAnyDatabaseReader(reader: any DatabaseReader) { _ = ValueObservation .trackingConstantRegion { _ in } @@ -14,7 +14,7 @@ class ValueObservationTests: GRDBTestCase { // Test passes if it compiles. // See - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testStartFromAnyDatabaseWriter(writer: any DatabaseWriter) { _ = ValueObservation .trackingConstantRegion { _ in } @@ -23,7 +23,7 @@ class ValueObservationTests: GRDBTestCase { // Test passes if it compiles. // See - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testValuesFromAnyDatabaseWriter(writer: any DatabaseWriter) { func observe( fetch: @escaping @Sendable (Database) throws -> T @@ -55,7 +55,7 @@ class ValueObservationTests: GRDBTestCase { try test(makeDatabasePool()) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testErrorCompletesTheObservation() throws { struct TestError: Error { } @@ -105,7 +105,7 @@ class ValueObservationTests: GRDBTestCase { try test(makeDatabasePool()) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testViewOptimization() throws { let dbQueue = try makeDatabaseQueue() try dbQueue.write { @@ -143,7 +143,7 @@ class ValueObservationTests: GRDBTestCase { } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testPragmaTableOptimization() throws { let dbQueue = try makeDatabaseQueue() try dbQueue.write { @@ -179,7 +179,7 @@ class ValueObservationTests: GRDBTestCase { // MARK: - Constant Explicit Region - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testTrackingExplicitRegion() throws { class TestStream: TextOutputStream { private var stringsMutex: Mutex<[String]> = Mutex([]) @@ -620,7 +620,7 @@ class ValueObservationTests: GRDBTestCase { // MARK: - Cancellation - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testCancellableLifetime() throws { // We need something to change let dbQueue = try makeDatabaseQueue() @@ -666,7 +666,7 @@ class ValueObservationTests: GRDBTestCase { XCTAssertEqual(changesCountMutex.load(), 2) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testCancellableExplicitCancellation() throws { // We need something to change let dbQueue = try makeDatabaseQueue() @@ -804,7 +804,7 @@ class ValueObservationTests: GRDBTestCase { try test(makeDatabasePool()) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testIssue1550() throws { func test(_ writer: some DatabaseWriter) throws { try writer.write { try $0.execute(sql: "CREATE TABLE t(id INTEGER PRIMARY KEY AUTOINCREMENT)") } @@ -852,7 +852,7 @@ class ValueObservationTests: GRDBTestCase { try test(makeDatabasePool()) } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testIssue1209() throws { func test(_ dbWriter: some DatabaseWriter) throws { try dbWriter.write { @@ -903,7 +903,7 @@ class ValueObservationTests: GRDBTestCase { } // MARK: - Main Actor - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) @MainActor func test_mainActor_observation() throws { let dbQueue = try makeDatabaseQueue() try dbQueue.write { db in @@ -939,7 +939,7 @@ class ValueObservationTests: GRDBTestCase { // MARK: - Async Await - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_values_prefix() async throws { func test(_ writer: some DatabaseWriter) async throws { // We need something to change @@ -977,7 +977,7 @@ class ValueObservationTests: GRDBTestCase { try await AsyncTest(test).runAtTemporaryDatabasePath { try DatabasePool(path: $0) } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_values_break() async throws { func test(_ writer: some DatabaseWriter) async throws { // We need something to change @@ -1019,7 +1019,7 @@ class ValueObservationTests: GRDBTestCase { try await AsyncTest(test).runAtTemporaryDatabasePath { try DatabasePool(path: $0) } } - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testAsyncAwait_values_cancelled() async throws { func test(_ writer: some DatabaseWriter) async throws { // We need something to change @@ -1201,7 +1201,7 @@ class ValueObservationTests: GRDBTestCase { } // Regression test for - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testIssue1362() throws { func test(_ writer: some DatabaseWriter) throws { try writer.write { try $0.execute(sql: "CREATE TABLE s(id INTEGER PRIMARY KEY AUTOINCREMENT)") } @@ -1292,7 +1292,7 @@ class ValueObservationTests: GRDBTestCase { } // Regression test for - @available(macOS 10.15, tvOS 13, *) + @available(macOS 10.15, *) func testIssue1383_async() throws { do { let dbPool = try makeDatabasePool(filename: "test")