Skip to content

Commit

Permalink
fix(ios): call webview.load on main thread on setServerBasePath (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Sep 16, 2019
1 parent 4f50f3f commit d7def71
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ios/Capacitor/Capacitor/CAPBridgeViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ public class CAPBridgeViewController: UIViewController, CAPBridgeDelegate, WKScr
public func setServerBasePath(path: String) {
setServerPath(path: path)
let request = URLRequest(url: URL(string: hostname!)!)
_ = getWebView().load(request)
DispatchQueue.main.async {
_ = self.getWebView().load(request)
}
}

override open var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
Expand Down

0 comments on commit d7def71

Please # to comment.