Skip to content

Commit 16e66d5

Browse files
authored
fix(browser): stop using deprecated dismissVC/presentVC (#2477)
1 parent bf4fe8c commit 16e66d5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

browser/ios/Sources/BrowserPlugin/BrowserPlugin.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class CAPBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
3030
}
3131
implementation.browserEventDidOccur = { [weak self] (event) in
3232
if event == .finished {
33-
self?.bridge?.dismissVC(animated: true, completion: {
33+
self?.bridge?.viewController?.dismiss(animated: true, completion: {
3434
self?.notifyListeners(event.listenerEvent, data: nil)
3535
})
3636
} else {
@@ -46,7 +46,7 @@ public class CAPBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
4646
self?.setCenteredPopover(viewController)
4747
}
4848
}
49-
self?.bridge?.presentVC(viewController, animated: true, completion: {
49+
self?.bridge?.viewController?.present(viewController, animated: true, completion: {
5050
call.resolve()
5151
})
5252
}
@@ -55,7 +55,7 @@ public class CAPBrowserPlugin: CAPPlugin, CAPBridgedPlugin {
5555
@objc func close(_ call: CAPPluginCall) {
5656
DispatchQueue.main.async { [weak self] in
5757
if self?.implementation.viewController != nil {
58-
self?.bridge?.dismissVC(animated: true) {
58+
self?.bridge?.viewController?.dismiss(animated: true) {
5959
call.resolve()
6060
self?.implementation.cleanup()
6161
}

0 commit comments

Comments
 (0)