Skip to content

Commit

Permalink
Bugfix FXIOS-10884, FXIOS-10736 "Open in Firefox" of share extension …
Browse files Browse the repository at this point in the history
…isn't working (#23762)

Bugfix FXIOS-10884, FXIOS-10736 "Open in Firefox" of share extension isn't working (#23762)
  • Loading branch information
gvardikos authored Dec 16, 2024
1 parent 4199bea commit 1cb2623
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions firefox-ios/Extensions/ShareTo/ShareViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,15 @@ extension ShareViewController {
var responder = self as UIResponder?
let selectorOpenURL = sel_registerName("openURL:")
while let current = responder {
if current.responds(to: selectorOpenURL) {
current.perform(selectorOpenURL, with: url, afterDelay: 0)
break
if #available(iOS 18.0, *) {
if let application = responder as? UIApplication {
application.open(url, options: [:], completionHandler: nil)
}
} else {
if current.responds(to: selectorOpenURL) {
current.perform(selectorOpenURL, with: url, afterDelay: 0)
break
}
}

responder = current.next
Expand Down

0 comments on commit 1cb2623

Please sign in to comment.