Skip to content

Commit

Permalink
Update async/await availability comments to "iOS 13+" (#12261)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard authored Jan 10, 2024
1 parent b880ec8 commit 7db032c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
12 changes: 6 additions & 6 deletions FirebaseAppCheck/Tests/Unit/Swift/AppCheckAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ final class AppCheckAPITests {
}

// Get token (async/await)
if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
try await AppCheck.appCheck().token(forcingRefresh: false)
Expand Down Expand Up @@ -95,8 +95,8 @@ final class AppCheckAPITests {
}

// Get token (async/await)
if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
_ = try await debugProvider.getToken()
Expand Down Expand Up @@ -166,8 +166,8 @@ final class AppCheckAPITests {
}
}
// Get token (async/await)
if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
_ = try await deviceCheckProvider.getToken()
Expand Down
4 changes: 2 additions & 2 deletions FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ final class CoreAPITests {
// ...
}

if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
await app.delete()
}
Expand Down
30 changes: 15 additions & 15 deletions FirebaseDatabase/Tests/Unit/Swift/DatabaseAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let /* dataSnapshot */ _: DataSnapshot = try await DatabaseQuery().getData()
Expand All @@ -137,7 +137,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
// observeSingleEvent(of eventType:)
let _: (DataSnapshot, String?) = await DatabaseQuery()
Expand Down Expand Up @@ -207,7 +207,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// setValue(_ value:)
Expand All @@ -227,7 +227,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// setValue(_ value:andPriority priority:)
Expand All @@ -249,7 +249,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let /* ref */ _: DatabaseReference = try await DatabaseReference().removeValue()
Expand All @@ -269,7 +269,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// setPriority(_ priority:)
Expand All @@ -290,7 +290,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// updateChildValues(_ values:)
Expand Down Expand Up @@ -344,7 +344,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
// observeSingleEvent(of eventType:)
let _: (DataSnapshot, String?) = await DatabaseReference()
Expand Down Expand Up @@ -376,7 +376,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let /* dataSnapshot */ _: DataSnapshot = try await DatabaseReference().getData()
Expand Down Expand Up @@ -418,7 +418,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// onDisconnectSetValue(_ value:)
Expand All @@ -440,7 +440,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// onDisconnectSetValue(_ value:andPriority priority:)
Expand All @@ -464,7 +464,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let /* ref */ _: DatabaseReference = try await DatabaseReference()
Expand All @@ -485,7 +485,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// onDisconnectUpdateChildValues(_ values:)
Expand All @@ -507,7 +507,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let /* ref */ _: DatabaseReference = try await DatabaseReference()
Expand Down Expand Up @@ -537,7 +537,7 @@ final class DatabaseAPITests {
}

if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
// runTransactionBlock(_ block:)
Expand Down
8 changes: 4 additions & 4 deletions FirebaseFunctions/Tests/Unit/FunctionsAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ final class FunctionsAPITests: XCTestCase {
}
}

if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let result = try await callableRef.call(data)
Expand All @@ -105,8 +105,8 @@ final class FunctionsAPITests: XCTestCase {
}
}

if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
let result = try await callableRef.call()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ final class InstallationsAPITests {
}
}

if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
try await Installations.installations().installationID()
Expand All @@ -71,8 +71,8 @@ final class InstallationsAPITests {
}
}

if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
_ = try await Installations.installations().authToken()
Expand All @@ -91,8 +91,8 @@ final class InstallationsAPITests {
}
}

if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
_ = try await Installations.installations().authTokenForcingRefresh(true)
Expand All @@ -110,8 +110,8 @@ final class InstallationsAPITests {
}

#if swift(>=5.5)
if #available(iOS 13.0, macOS 11.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift 5.5+ feature available on iOS 15+
if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) {
// async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+
Task {
do {
_ = try await Installations.installations().delete()
Expand Down

0 comments on commit 7db032c

Please sign in to comment.