100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
iOS console : moved code protocol custom class, removed unnecessary code
William Balcaen25af7f7dc1fe
diff --git a/console/iOS/console/AppDelegate.swift b/console/iOS/console/AppDelegate.swiftindex 4a1d3e0ff..2dc7923cb 100644--- a/console/iOS/console/AppDelegate.swift+++ b/console/iOS/console/AppDelegate.swift@@ -17,7 +17,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {// allows to catch all request and add custom headers (works only with UIWebView not WKWebView).- URLProtocol.registerClass(CustomURLProtocol.self)return true}diff --git a/console/iOS/console/Base.lproj/Main.storyboard b/console/iOS/console/Base.lproj/Main.storyboardindex 724cbb4a0..7264c24db 100644--- a/console/iOS/console/Base.lproj/Main.storyboard+++ b/console/iOS/console/Base.lproj/Main.storyboard@@ -60,7 +60,7 @@</viewController><placeholder placeholderIdentifier="IBFirstResponder" id="2MI-jb-AAz" userLabel="First Responder" sceneMemberID="firstResponder"/></objects>- <point key="canvasLocation" x="1758" y="113"/>+ <point key="canvasLocation" x="1757.5999999999999" y="112.89355322338831"/></scene><!--Navigation Controller--><scene sceneID="Ql9-8p-n0P">diff --git a/console/iOS/console/ORViewController.swift b/console/iOS/console/ORViewController.swiftindex dcd654c39..52dfb7867 100644--- a/console/iOS/console/ORViewController.swift+++ b/console/iOS/console/ORViewController.swift@@ -10,7 +10,7 @@ import Foundationimport UIKitimport WebKit-class ORViewcontroller : UIViewController, URLSessionDelegate, UIWebViewDelegate {+class ORViewcontroller : UIViewController, URLSessionDelegate {var accessToken : String = ""@@ -18,19 +18,13 @@ class ORViewcontroller : UIViewController, URLSessionDelegate, UIWebViewDelegatesuper.viewDidLoad()CustomURLProtocol.accessToken = accessToken-- let webConfiguration = WKWebViewConfiguration()- webConfiguration.preferences.javaScriptEnabled = true;- webConfiguration.ignoresViewportScaleLimits = true;- webConfiguration.preferences.javaScriptCanOpenWindowsAutomatically = true;let myWebView = UIWebView(frame: view.frame)view.addSubview(myWebView)- myWebView.delegate = selflet url = URL(string:String(format:"http://%@:%@/%@",Server.hostURL,Server.port,Server.initialPath))let request = URLRequest(url: url!)-+ myWebView.scalesPageToFit = truemyWebView.loadRequest(request)}diff --git a/console/iOS/console/ViewController.swift b/console/iOS/console/ViewController.swiftindex aae364b9e..68e534176 100644--- a/console/iOS/console/ViewController.swift+++ b/console/iOS/console/ViewController.swift@@ -43,7 +43,7 @@ class ViewController: UIViewController {var token : Stringif response != nil {token = response! as! String-+ URLProtocol.registerClass(CustomURLProtocol.self)let orVC = ORViewcontroller()orVC.accessToken = token