Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Only load configure webview once in ORViewController.swift

Michael Rademakerf523b8b04023
diff --git a/console/iOS/ORLib/ORLib/UI/ORViewController.swift b/console/iOS/ORLib/ORLib/UI/ORViewController.swift
index 26631f5ce..fa2c09722 100644
--- a/console/iOS/ORLib/ORLib/UI/ORViewController.swift
+++ b/console/iOS/ORLib/ORLib/UI/ORViewController.swift
@@ -45,10 +45,6 @@ open class ORViewcontroller : UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor.white
- }
-
- open override func viewWillAppear(_ animated: Bool) {
- super.viewWillAppear(animated)
self.configureAccess()
}
@@ -68,6 +64,7 @@ open class ORViewcontroller : UIViewController {
let returnMessage = "OpenRemoteConsole._handleProviderResponse('\(theJSONText ?? "null")')"
DispatchQueue.main.async {
self.myWebView?.evaluateJavaScript("\(returnMessage)", completionHandler: { (any, error) in
+ print(error)
print("JSON string = \(theJSONText!)")
})
}