From 1b66924dcf45616c7170f6797bd9b1bfd04a6fee Mon Sep 17 00:00:00 2001 From: manuroe Date: Mon, 7 May 2018 09:28:39 +0200 Subject: [PATCH] IntegrationManagerVC: enableDebug is now defined in the kit --- .../Widgets/IntegrationManagerViewController.h | 2 +- .../Widgets/IntegrationManagerViewController.m | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/Riot/ViewController/Widgets/IntegrationManagerViewController.h b/Riot/ViewController/Widgets/IntegrationManagerViewController.h index 213147720..058567e6a 100644 --- a/Riot/ViewController/Widgets/IntegrationManagerViewController.h +++ b/Riot/ViewController/Widgets/IntegrationManagerViewController.h @@ -25,7 +25,7 @@ FOUNDATION_EXPORT NSString *const kIntegrationManagerAddIntegrationScreen; `IntegrationManagerViewController` displays the Modular integration manager webapp into a webview. */ -@interface IntegrationManagerViewController : WebViewViewController +@interface IntegrationManagerViewController : WebViewViewController /** Initialise with params for the Modular interface webapp. diff --git a/Riot/ViewController/Widgets/IntegrationManagerViewController.m b/Riot/ViewController/Widgets/IntegrationManagerViewController.m index 742c522e8..aabd191c8 100644 --- a/Riot/ViewController/Widgets/IntegrationManagerViewController.m +++ b/Riot/ViewController/Widgets/IntegrationManagerViewController.m @@ -19,8 +19,6 @@ #import "WidgetManager.h" #import "AppDelegate.h" -#import - NSString *const kIntegrationManagerMainScreen = nil; NSString *const kIntegrationManagerAddIntegrationScreen = @"add_integ"; @@ -147,18 +145,6 @@ NSString *const kJavascriptSendResponseToModular = @"riotIOS.sendResponse('%@', return url; } -- (void)enableDebug -{ - // Setup console.log() -> NSLog() route - JSContext *ctx = [webView valueForKeyPath:@"documentView.webView.mainFrame.javaScriptContext"]; - ctx[@"console"][@"log"] = ^(JSValue * msg) { - NSLog(@"-- JavaScript: %@", msg); - }; - - // Redirect all console.* logging methods to console.log - [webView stringByEvaluatingJavaScriptFromString:@"console.debug = console.log; console.info = console.log; console.warn = console.log; console.error = console.log;"]; -} - - (void)showErrorAsAlert:(NSError*)error { NSString *title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];