From 350d29313ee3f9315d8914f6ec602d7535f73516 Mon Sep 17 00:00:00 2001 From: Orla Date: Fri, 6 Dec 2024 12:50:08 -0500 Subject: [PATCH] Update api --- firefox-ios/Client/Application/DefaultBrowserUtil.swift | 2 +- firefox-ios/Client/Utils/UIApplicationInterface.swift | 2 +- .../Tests/ClientTests/Application/MockUIApplication.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firefox-ios/Client/Application/DefaultBrowserUtil.swift b/firefox-ios/Client/Application/DefaultBrowserUtil.swift index 8a4032151b6f7..68d7eb54bee00 100644 --- a/firefox-ios/Client/Application/DefaultBrowserUtil.swift +++ b/firefox-ios/Client/Application/DefaultBrowserUtil.swift @@ -25,7 +25,7 @@ struct DefaultBrowserUtil { func processUserDefaultState(isFirstRun: Bool) { guard #available(iOS 18.2, *), - let isDefault = try? application.isDefaultApplication(for: .webBrowser) + let isDefault = try? application.isDefault(.webBrowser) else { return } trackIfUserIsDefault(isDefault) diff --git a/firefox-ios/Client/Utils/UIApplicationInterface.swift b/firefox-ios/Client/Utils/UIApplicationInterface.swift index 6d0b37e92bc6f..305eb88c74b6b 100644 --- a/firefox-ios/Client/Utils/UIApplicationInterface.swift +++ b/firefox-ios/Client/Utils/UIApplicationInterface.swift @@ -12,7 +12,7 @@ protocol UIApplicationInterface { @available(watchOS, unavailable) @MainActor @preconcurrency - func isDefaultApplication(for category: UIApplication.Category) throws -> Bool + func isDefault(_ category: UIApplication.Category) throws -> Bool } extension UIApplication: UIApplicationInterface {} diff --git a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/MockUIApplication.swift b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/MockUIApplication.swift index e4ef19694dfed..27118f5dcbadd 100644 --- a/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/MockUIApplication.swift +++ b/firefox-ios/firefox-ios-tests/Tests/ClientTests/Application/MockUIApplication.swift @@ -8,7 +8,7 @@ class MockUIApplication: UIApplicationInterface { var mockDefaultApplicationValue = false @available(iOS 18.2, *) - func isDefaultApplication(for category: UIApplication.Category) throws -> Bool { + func isDefault(_ category: UIApplication.Category) throws -> Bool { return mockDefaultApplicationValue } }