Skip to content

armgit / core

Public Imported from GitHub
0

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

iOS console : code formatting

William Balcaencc32a069f956
diff --git a/console/iOS/console/AppDelegate.swift b/console/iOS/console/AppDelegate.swift
index d70d822b3..db3bdae9f 100644
--- a/console/iOS/console/AppDelegate.swift
+++ b/console/iOS/console/AppDelegate.swift
@@ -21,7 +21,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
var reachabilityAlert : UIAlertController?
var reachabilityAlertShown = false
let internetReachability = Reachability.forInternetConnection()
-
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
setActions()
@@ -39,9 +39,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
NotificationCenter.default.addObserver(self, selector: #selector(self.tokenRefreshNotification), name: NSNotification.Name.firInstanceIDTokenRefresh, object: nil)
NotificationCenter.default.addObserver(self,
- selector: #selector(self.reachabilityChanged(note:)),
- name: NSNotification.Name.reachabilityChanged,
- object: internetReachability)
+ selector: #selector(self.reachabilityChanged(note:)),
+ name: NSNotification.Name.reachabilityChanged,
+ object: internetReachability)
internetReachability?.startNotifier()
self.updateReachabilityStatus(reachability: internetReachability!)
return true
@@ -65,9 +65,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
- DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
- self.internetReachability?.startNotifier()
- self.updateReachabilityStatus(reachability: self.internetReachability!)
+ DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
+ self.internetReachability?.startNotifier()
+ self.updateReachabilityStatus(reachability: self.internetReachability!)
}
}
@@ -111,7 +111,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
NSLog("Action asked : %@",response.actionIdentifier)
}
-
+
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
if (self.currentAuthorizationFlow?.resumeAuthorizationFlow(with: url))! {
diff --git a/console/iOS/console/TokenManager.swift b/console/iOS/console/TokenManager.swift
index 957e60b7e..5766d4c89 100644
--- a/console/iOS/console/TokenManager.swift
+++ b/console/iOS/console/TokenManager.swift
@@ -132,7 +132,6 @@ class TokenManager:NSObject, WKScriptMessageHandler, WKUIDelegate, WKNavigationD
NotificationCenter.default.post(name: notificationName, object: nil)
})
}
-
}
func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {
@@ -159,7 +158,7 @@ class TokenManager:NSObject, WKScriptMessageHandler, WKUIDelegate, WKNavigationD
NSLog("error %@", error.localizedDescription)
showError(error: NSError(domain: "navigationError", code: 0, userInfo:[
NSLocalizedDescriptionKey : NSLocalizedString("navigationError", value: "Could not navigate to page", comment: "")
- ]))
+ ]))
}
}
@@ -253,7 +252,6 @@ class TokenManager:NSObject, WKScriptMessageHandler, WKUIDelegate, WKNavigationD
}
})
req.resume()
-
}
func showError(error : Error) {