Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ios): Change CAPBridgeViewController class access to open #1972

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions ios/Capacitor/Capacitor/CAPBridgeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import UIKit
import WebKit
import Cordova

public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate {
open class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScriptMessageHandler, WKUIDelegate, WKNavigationDelegate {

private var webView: WKWebView?

Expand All @@ -34,7 +34,7 @@ public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScr
public var bridge: CAPBridge?
private var handler: CAPAssetHandler?

override public func loadView() {
override open func loadView() {
let configUrl = Bundle.main.url(forResource: "config", withExtension: "xml")
let configParser = XMLParser(contentsOf: configUrl!)!;
configParser.delegate = cordovaParser
Expand Down Expand Up @@ -131,7 +131,7 @@ public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScr
return false
}

override public func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
self.becomeFirstResponder()
loadWebView()
Expand Down Expand Up @@ -263,7 +263,7 @@ public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScr
webView.reload()
}

public override func canPerformUnwindSegueAction(_ action: Selector, from fromViewController: UIViewController, withSender sender: Any) -> Bool {
open override func canPerformUnwindSegueAction(_ action: Selector, from fromViewController: UIViewController, withSender sender: Any) -> Bool {
return false
}

Expand Down Expand Up @@ -355,24 +355,24 @@ public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScr
return host == pattern
}

override public func didReceiveMemoryWarning() {
override open func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

override public var prefersStatusBarHidden: Bool {
override open var prefersStatusBarHidden: Bool {
get {
return !isStatusBarVisible
}
}

override public var preferredStatusBarStyle: UIStatusBarStyle {
override open var preferredStatusBarStyle: UIStatusBarStyle {
get {
return statusBarStyle
}
}

override public var preferredStatusBarUpdateAnimation: UIStatusBarAnimation {
override open var preferredStatusBarUpdateAnimation: UIStatusBarAnimation {
get {
return .slide
}
Expand Down Expand Up @@ -471,7 +471,7 @@ public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScr
return UIApplication.shared.statusBarOrientation
}

override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
override open var supportedInterfaceOrientations: UIInterfaceOrientationMask {
var ret = 0
if self.supportedOrientations.contains(UIInterfaceOrientation.portrait.rawValue) {
ret = ret | (1 << UIInterfaceOrientation.portrait.rawValue)
Expand Down