diff --git a/FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift b/FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift index ab5c52b069..92344930d4 100644 --- a/FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift +++ b/FirebaseAnalytics/Tests/SwiftUnit/AnalyticsAPITests.swift @@ -37,13 +37,11 @@ final class AnalyticsAPITests { Analytics.setDefaultEventParameters(["default": 100]) Analytics.sessionID { sessionID, error in } - if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) { - Task { - let _: Int64? = try? await Analytics.sessionID() - } + Task { + let _: Int64? = try? await Analytics.sessionID() } - @available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *) + @available(macOS 12.0, *) @available(watchOS, unavailable) func logTransactionUsage() { let transaction: StoreKit.Transaction! = nil @@ -53,11 +51,10 @@ final class AnalyticsAPITests { // MARK: - AppDelegate Analytics.handleEvents(forBackgroundURLSession: "session_id", completionHandler: {}) - if #available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, watchOS 7.0, *) { - Task { - await Analytics.handleEvents(forBackgroundURLSession: "session_id") - } + Task { + await Analytics.handleEvents(forBackgroundURLSession: "session_id") } + Analytics.handleOpen(URL(string: "https://google.com")!) Analytics.handleUserActivity(NSUserActivity(activityType: "editing")) @@ -198,7 +195,6 @@ final class AnalyticsAPITests { // MARK: - Analytics + SwiftUI - @available(iOS 13.0, macOS 10.15, macCatalyst 13.0, tvOS 13.0, *) @available(watchOS, unavailable) struct MyView: View { let name: String diff --git a/FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m b/FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m index 43b9357010..1602c5ff05 100644 --- a/FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m +++ b/FirebaseAppDistribution/Sources/FIRAppDistributionUIService.m @@ -88,9 +88,7 @@ ASWebAuthenticationSession *_webAuthenticationVC; completion(appDistributionError); }]; - if (@available(iOS 13.0, *)) { - authenticationVC.presentationContextProvider = self; - } + authenticationVC.presentationContextProvider = self; _webAuthenticationVC = authenticationVC; @@ -164,30 +162,26 @@ ASWebAuthenticationSession *_webAuthenticationVC; return; } - if (@available(iOS 13.0, *)) { - UIWindowScene *foregroundedScene = nil; - for (UIWindowScene *connectedScene in [UIApplication sharedApplication].connectedScenes) { - if (connectedScene.activationState == UISceneActivationStateForegroundActive) { - foregroundedScene = connectedScene; - break; - } + UIWindowScene *foregroundedScene = nil; + for (UIWindowScene *connectedScene in [UIApplication sharedApplication].connectedScenes) { + if (connectedScene.activationState == UISceneActivationStateForegroundActive) { + foregroundedScene = connectedScene; + break; } + } - if (foregroundedScene) { - self.window = [[UIWindow alloc] initWithWindowScene:foregroundedScene]; - } else if ([UIApplication sharedApplication].connectedScenes.count == 1) { - // There are situations where a scene isn't considered foreground in viewDidAppear - // and this fixes the issue in single scene apps. - // https://github.com/firebase/firebase-ios-sdk/issues/8096 - UIWindowScene *scene = - (UIWindowScene *)[UIApplication sharedApplication].connectedScenes.anyObject; - self.window = [[UIWindow alloc] initWithWindowScene:scene]; - } else { - // TODO: Consider using UISceneDidActivateNotification. - FIRFADInfoLog(@"No foreground scene found."); - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - } + if (foregroundedScene) { + self.window = [[UIWindow alloc] initWithWindowScene:foregroundedScene]; + } else if ([UIApplication sharedApplication].connectedScenes.count == 1) { + // There are situations where a scene isn't considered foreground in viewDidAppear + // and this fixes the issue in single scene apps. + // https://github.com/firebase/firebase-ios-sdk/issues/8096 + UIWindowScene *scene = + (UIWindowScene *)[UIApplication sharedApplication].connectedScenes.anyObject; + self.window = [[UIWindow alloc] initWithWindowScene:scene]; } else { + // TODO: Consider using UISceneDidActivateNotification. + FIRFADInfoLog(@"No foreground scene found."); self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; } self.window.rootViewController = self.safariHostingViewController; @@ -223,7 +217,7 @@ ASWebAuthenticationSession *_webAuthenticationVC; } - (ASPresentationAnchor)presentationAnchorForWebAuthenticationSession: - (ASWebAuthenticationSession *)session API_AVAILABLE(ios(13.0)) { + (ASWebAuthenticationSession *)session { return self.safariHostingViewController.view.window; } diff --git a/FirebaseAppDistribution/Tests/Unit/Swift/AppDistributionAPITest.swift b/FirebaseAppDistribution/Tests/Unit/Swift/AppDistributionAPITest.swift index 371843663d..1da6604bd1 100644 --- a/FirebaseAppDistribution/Tests/Unit/Swift/AppDistributionAPITest.swift +++ b/FirebaseAppDistribution/Tests/Unit/Swift/AppDistributionAPITest.swift @@ -16,7 +16,6 @@ import XCTest class AppDistributionAPITests: XCTestCase { - @available(iOS 13.0.0, *) func asyncAPIs() async throws { let distro = AppDistribution.appDistribution() diff --git a/FirebaseCore/Extension/FIRHeartbeatLogger.h b/FirebaseCore/Extension/FIRHeartbeatLogger.h index 95497d2a68..c4ae4dc45a 100644 --- a/FirebaseCore/Extension/FIRHeartbeatLogger.h +++ b/FirebaseCore/Extension/FIRHeartbeatLogger.h @@ -44,8 +44,7 @@ NS_SWIFT_SENDABLE #ifndef FIREBASE_BUILD_CMAKE /// Returns the header value for the heartbeat logger via the given completion handler.. -- (void)asyncHeaderValueWithCompletionHandler:(void (^)(NSString *_Nullable))completionHandler - API_AVAILABLE(ios(13.0), macosx(10.15), macCatalyst(13.0), tvos(13.0), watchos(6.0)); +- (void)asyncHeaderValueWithCompletionHandler:(void (^)(NSString *_Nullable))completionHandler; /// Return the header value for the heartbeat logger. - (NSString *_Nullable)headerValue; @@ -91,8 +90,7 @@ NSString *_Nullable FIRHeaderValueFromHeartbeatsPayload(FIRHeartbeatsPayload *he /// @note This API is thread-safe. /// @param completionHandler A completion handler to process the flushed payload of heartbeats. - (void)flushHeartbeatsIntoPayloadWithCompletionHandler: - (void (^)(FIRHeartbeatsPayload *))completionHandler - API_AVAILABLE(ios(13.0), macosx(10.15), macCatalyst(13.0), tvos(13.0), watchos(6.0)); + (void (^)(FIRHeartbeatsPayload *))completionHandler; #endif // FIREBASE_BUILD_CMAKE /// Gets today's corresponding heartbeat code. diff --git a/FirebaseCore/Sources/FIRHeartbeatLogger.m b/FirebaseCore/Sources/FIRHeartbeatLogger.m index 4becd085c2..7e5ab5ae10 100644 --- a/FirebaseCore/Sources/FIRHeartbeatLogger.m +++ b/FirebaseCore/Sources/FIRHeartbeatLogger.m @@ -74,8 +74,7 @@ NSString *_Nullable FIRHeaderValueFromHeartbeatsPayload(FIRHeartbeatsPayload *he return FIRHeaderValueFromHeartbeatsPayload([self flushHeartbeatsIntoPayload]); } -- (void)asyncHeaderValueWithCompletionHandler:(void (^)(NSString *_Nullable))completionHandler - API_AVAILABLE(ios(13.0), macosx(10.15), macCatalyst(13.0), tvos(13.0), watchos(6.0)) { +- (void)asyncHeaderValueWithCompletionHandler:(void (^)(NSString *_Nullable))completionHandler { [self flushHeartbeatsIntoPayloadWithCompletionHandler:^(FIRHeartbeatsPayload *payload) { completionHandler(FIRHeaderValueFromHeartbeatsPayload(payload)); }]; @@ -87,8 +86,7 @@ NSString *_Nullable FIRHeaderValueFromHeartbeatsPayload(FIRHeartbeatsPayload *he } - (void)flushHeartbeatsIntoPayloadWithCompletionHandler: - (void (^)(FIRHeartbeatsPayload *))completionHandler - API_AVAILABLE(ios(13.0), macosx(10.15), macCatalyst(13.0), tvos(13.0), watchos(6.0)) { + (void (^)(FIRHeartbeatsPayload *))completionHandler { [_heartbeatController flushAsyncWithCompletionHandler:^(FIRHeartbeatsPayload *payload) { completionHandler(payload); }]; diff --git a/FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift b/FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift index 8ac8e5960b..3b8aac141e 100644 --- a/FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift +++ b/FirebaseCore/Tests/SwiftUnit/CoreAPITests.swift @@ -51,11 +51,9 @@ final class CoreAPITests { // ... } - 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() - } + // async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+ + Task { + await app.delete() } } diff --git a/FirebaseCore/Tests/Unit/FIRAppTest.m b/FirebaseCore/Tests/Unit/FIRAppTest.m index 85c63ab90e..3a0f0c49f7 100644 --- a/FirebaseCore/Tests/Unit/FIRAppTest.m +++ b/FirebaseCore/Tests/Unit/FIRAppTest.m @@ -865,11 +865,7 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2"; return NSApplicationDidBecomeActiveNotification; #elif TARGET_OS_WATCH // See comment in `- [FIRApp subscribeForAppDidBecomeActiveNotifications]`. - if (@available(watchOS 7.0, *)) { - return WKApplicationDidBecomeActiveNotification; - } else { - return kFIRAppReadyToConfigureSDKNotification; - } + return WKApplicationDidBecomeActiveNotification; #endif } diff --git a/FirebaseCore/Tests/Unit/FIRHeartbeatLoggerTests.m b/FirebaseCore/Tests/Unit/FIRHeartbeatLoggerTests.m index 93f3d2bc87..daf94a32db 100644 --- a/FirebaseCore/Tests/Unit/FIRHeartbeatLoggerTests.m +++ b/FirebaseCore/Tests/Unit/FIRHeartbeatLoggerTests.m @@ -125,8 +125,7 @@ }]; } -- (void)testFlushingAsync_UsingV2API_WhenHeartbeatsAreStored_ReturnsNonEmptyPayload API_AVAILABLE( - ios(13.0), macosx(10.15), macCatalyst(13.0), tvos(13.0), watchos(6.0)) { +- (void)testFlushingAsync_UsingV2API_WhenHeartbeatsAreStored_ReturnsNonEmptyPayload { // Given FIRHeartbeatLogger *heartbeatLogger = self.heartbeatLogger; NSString *expectedDate = [[self class] formattedStringForDate:[NSDate date]]; @@ -158,8 +157,7 @@ [self assertHeartbeatsPayloadIsEmpty:heartbeatsPayload]; } -- (void)testFlushingAsync_UsingV2API_WhenNoHeartbeatsAreStored_ReturnsEmptyPayload API_AVAILABLE( - ios(13.0), macosx(10.15), macCatalyst(13.0), tvos(13.0), watchos(6.0)) { +- (void)testFlushingAsync_UsingV2API_WhenNoHeartbeatsAreStored_ReturnsEmptyPayload { // Given FIRHeartbeatLogger *heartbeatLogger = self.heartbeatLogger; // When diff --git a/FirebaseFunctions/Sources/Callable+Codable.swift b/FirebaseFunctions/Sources/Callable+Codable.swift index ca4790b305..bb09135a09 100644 --- a/FirebaseFunctions/Sources/Callable+Codable.swift +++ b/FirebaseFunctions/Sources/Callable+Codable.swift @@ -217,7 +217,7 @@ public enum StreamResponse AsyncThrowingStream { functions.stream(at: url, data: data, options: options, timeout: timeoutInterval) } diff --git a/FirebaseFunctions/Tests/Integration/IntegrationTests.swift b/FirebaseFunctions/Tests/Integration/IntegrationTests.swift index 50b48f8c5f..c602897441 100644 --- a/FirebaseFunctions/Tests/Integration/IntegrationTests.swift +++ b/FirebaseFunctions/Tests/Integration/IntegrationTests.swift @@ -895,7 +895,7 @@ class IntegrationTests: XCTestCase { /// indicate the callable function does not accept parameters. private struct EmptyRequest: Encodable, Sendable {} -@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *) +@available(macOS 12.0, watchOS 8.0, *) extension IntegrationTests { func testStream_NoArgs() async throws { // 1. Custom `EmptyRequest` struct is passed as a placeholder generic arg. diff --git a/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m b/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m index 1c2f5d374f..08098608c4 100644 --- a/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m +++ b/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDStore.m @@ -203,11 +203,7 @@ static NSString *const kFIRInstallationsIIDCreationTimePlistKey = @"|S|cre"; NSMutableDictionary *plistContent = [[NSMutableDictionary alloc] initWithContentsOfFile:path]; plistContent[kFIRInstallationsIIDCreationTimePlistKey] = nil; - if (@available(macOS 10.13, iOS 11.0, tvOS 11.0, *)) { - return [plistContent writeToURL:[NSURL fileURLWithPath:path] error:outError]; - } - - return [plistContent writeToFile:path atomically:YES]; + return [plistContent writeToURL:[NSURL fileURLWithPath:path] error:outError]; } - (BOOL)hasPlistIIDFlag { diff --git a/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m b/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m index 5ef3331e7b..dd2e2cabc0 100644 --- a/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m +++ b/FirebaseInstallations/Source/Library/IIDMigration/FIRInstallationsIIDTokenStore.m @@ -80,18 +80,7 @@ static NSString *const kFIRInstallationsIIDTokenKeychainId = @"com.google.iid-to NSError *archiverError; NSKeyedUnarchiver *unarchiver; - if (@available(iOS 11.0, tvOS 11.0, macOS 10.13, *)) { - unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:data error:&archiverError]; - } else { - @try { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; -#pragma clang diagnostic pop - } @catch (NSException *exception) { - archiverError = [FIRInstallationsErrorUtil keyedArchiverErrorWithException:exception]; - } - } + unarchiver = [[NSKeyedUnarchiver alloc] initForReadingFromData:data error:&archiverError]; if (!unarchiver) { NSError *error = archiverError ?: [FIRInstallationsErrorUtil corruptedIIDTokenData]; diff --git a/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift b/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift index fbe6fc1ec0..aff142c2d7 100644 --- a/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift +++ b/FirebaseInstallations/Source/Tests/Unit/Swift/InstallationsAPITests.swift @@ -51,14 +51,12 @@ final class InstallationsAPITests { } } - 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() - } catch { - // ... - } + // async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+ + Task { + do { + try await Installations.installations().installationID() + } catch { + // ... } } @@ -71,14 +69,12 @@ final class InstallationsAPITests { } } - 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() - } catch { - // ... - } + // async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+ + Task { + do { + _ = try await Installations.installations().authToken() + } catch { + // ... } } @@ -91,14 +87,12 @@ final class InstallationsAPITests { } } - 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) - } catch { - // ... - } + // async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+ + Task { + do { + _ = try await Installations.installations().authTokenForcingRefresh(true) + } catch { + // ... } } @@ -109,20 +103,18 @@ final class InstallationsAPITests { } } - 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() - } catch let error as NSError - where error.domain == InstallationsErrorDomain && error.code == InstallationsErrorCode - .unknown.rawValue { - // Above is the old way to handle errors. - } catch InstallationsErrorCode.unknown { - // Above is the new way to handle errors. - } catch { - // ... - } + // async/await is a Swift Concurrency feature available on iOS 13+ and macOS 10.15+ + Task { + do { + _ = try await Installations.installations().delete() + } catch let error as NSError + where error.domain == InstallationsErrorDomain && error.code == InstallationsErrorCode + .unknown.rawValue { + // Above is the old way to handle errors. + } catch InstallationsErrorCode.unknown { + // Above is the new way to handle errors. + } catch { + // ... } } diff --git a/FirebaseInstallations/Source/Tests/Utils/FIRKeyedArchivingUtils.m b/FirebaseInstallations/Source/Tests/Utils/FIRKeyedArchivingUtils.m index e0a31749ed..f12fb96555 100644 --- a/FirebaseInstallations/Source/Tests/Utils/FIRKeyedArchivingUtils.m +++ b/FirebaseInstallations/Source/Tests/Utils/FIRKeyedArchivingUtils.m @@ -19,67 +19,15 @@ @implementation FIRKeyedArchivingUtils + (nullable NSData *)archivedDataWithRootObject:(id)object error:(NSError **)outError { - NSData *archivedData; - if (@available(macOS 10.13, iOS 11.0, tvOS 11.0, *)) { - archivedData = [NSKeyedArchiver archivedDataWithRootObject:object - requiringSecureCoding:YES - error:outError]; - } else { - @try { - NSMutableData *data = [NSMutableData data]; -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; -#pragma clang diagnostic pop - archiver.requiresSecureCoding = YES; - - [archiver encodeObject:object forKey:NSKeyedArchiveRootObjectKey]; - [archiver finishEncoding]; - - archivedData = [data copy]; - } @catch (NSException *exception) { - if (outError) { - NSString *failureReason = [NSString stringWithFormat:@"Exception: %@", exception]; - *outError = [NSError errorWithDomain:@"FIRKeyedArchivingUtils" - code:-1 - userInfo:@{ - NSLocalizedFailureReasonErrorKey : failureReason, - }]; - } - } - } - - return archivedData; + return [NSKeyedArchiver archivedDataWithRootObject:object + requiringSecureCoding:YES + error:outError]; } + (nullable id)unarchivedObjectOfClass:(Class)class fromData:(NSData *)data error:(NSError **)outError { - id object; - if (@available(macOS 10.13, iOS 11.0, tvOS 11.0, *)) { - object = [NSKeyedUnarchiver unarchivedObjectOfClass:class fromData:data error:outError]; - } else { - @try { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; -#pragma clang diagnostic pop - unarchiver.requiresSecureCoding = YES; - - object = [unarchiver decodeObjectOfClass:class forKey:NSKeyedArchiveRootObjectKey]; - } @catch (NSException *exception) { - if (outError) { - NSString *failureReason = [NSString stringWithFormat:@"Exception: %@", exception]; - *outError = [NSError errorWithDomain:@"FIRKeyedArchivingUtils" - code:-1 - userInfo:@{ - NSLocalizedFailureReasonErrorKey : failureReason, - }]; - } - } - } - - return object; + return [NSKeyedUnarchiver unarchivedObjectOfClass:class fromData:data error:outError]; } @end diff --git a/FirebaseRemoteConfig/Swift/RemoteConfig+Async.swift b/FirebaseRemoteConfig/Swift/RemoteConfig+Async.swift index facc32e429..6496c387fd 100644 --- a/FirebaseRemoteConfig/Swift/RemoteConfig+Async.swift +++ b/FirebaseRemoteConfig/Swift/RemoteConfig+Async.swift @@ -14,7 +14,6 @@ import Foundation -@available(iOS 13.0.0, macOS 10.15.0, macCatalyst 13.0.0, tvOS 13.0.0, watchOS 7.0.0, *) public extension RemoteConfig { /// Returns an `AsyncSequence` that provides real-time updates to the configuration. /// diff --git a/FirebaseRemoteConfig/Tests/Swift/SwiftAPI/FirebaseRemoteConfigSwift_APIBuildTests.swift b/FirebaseRemoteConfig/Tests/Swift/SwiftAPI/FirebaseRemoteConfigSwift_APIBuildTests.swift index 8b70c99a60..003586be21 100644 --- a/FirebaseRemoteConfig/Tests/Swift/SwiftAPI/FirebaseRemoteConfigSwift_APIBuildTests.swift +++ b/FirebaseRemoteConfig/Tests/Swift/SwiftAPI/FirebaseRemoteConfigSwift_APIBuildTests.swift @@ -144,16 +144,14 @@ final class FirebaseRemoteConfig_APIBuildTests: XCTestCase { config.activate() - if #available(iOS 13.0, *) { - Task { - let _: Void = try await config.ensureInitialized() - let _: FirebaseRemoteConfig.RemoteConfigFetchStatus = try await config.fetch() - let _: FirebaseRemoteConfig.RemoteConfigFetchStatus = try await config - .fetch(withExpirationDuration: TimeInterval(100)) - let _: FirebaseRemoteConfig.RemoteConfigFetchAndActivateStatus = try await config - .fetchAndActivate() - let _: Bool = try await config.activate() - } + Task { + let _: Void = try await config.ensureInitialized() + let _: FirebaseRemoteConfig.RemoteConfigFetchStatus = try await config.fetch() + let _: FirebaseRemoteConfig.RemoteConfigFetchStatus = try await config + .fetch(withExpirationDuration: TimeInterval(100)) + let _: FirebaseRemoteConfig.RemoteConfigFetchAndActivateStatus = try await config + .fetchAndActivate() + let _: Bool = try await config.activate() } let _: FirebaseRemoteConfig.RemoteConfigValue = config["key"] diff --git a/FirebaseSharedSwift/Tests/third_party/DataEncoderTests.swift b/FirebaseSharedSwift/Tests/third_party/DataEncoderTests.swift index 0b7f01a0e1..e9e5aa77cf 100644 --- a/FirebaseSharedSwift/Tests/third_party/DataEncoderTests.swift +++ b/FirebaseSharedSwift/Tests/third_party/DataEncoderTests.swift @@ -151,12 +151,8 @@ class TestFirebaseDataEncoder: XCTestCase { } let model = Model.testValue - if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { - let expected = ["top": ["first": "Johnny Appleseed", "second": "appleseed@apple.com"]] - _testRoundTrip(of: model, expected: expected) - } else { - _testRoundTrip(of: model) - } + let expected = ["top": ["first": "Johnny Appleseed", "second": "appleseed@apple.com"]] + _testRoundTrip(of: model, expected: expected) } // NOTE: This test causes a precondition error, so I am uncertain about how it ought to be tested. @@ -193,11 +189,9 @@ class TestFirebaseDataEncoder: XCTestCase { // // let model = Model.testValue // // This following test would fail as it attempts to re-encode into already encoded container is invalid. This will always fail -// if #available(OSX 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *) { -// _testEncodeFailure(of: model) -// } else { -// _testEncodeFailure(of: model) -// } +// _testEncodeFailure(of: model) +// + // } // MARK: - Date Strategy Tests