Skip to content

Commit

Permalink
Update api
Browse files Browse the repository at this point in the history
  • Loading branch information
OrlaM committed Dec 6, 2024
1 parent 4908dfe commit 350d293
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion firefox-ios/Client/Application/DefaultBrowserUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion firefox-ios/Client/Utils/UIApplicationInterface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 350d293

Please sign in to comment.