From d91e44427def82ed27811251ef08fbf393a32901 Mon Sep 17 00:00:00 2001 From: Ravi Ranjan Date: Tue, 10 Aug 2021 23:34:34 +0530 Subject: [PATCH] Dapp Isseue solved Example with Issue number #338 #337 #321 #304 #303 --- .../Web3support/AppDelegate.swift | 1 - .../ViewController/BrowserViewController.swift | 15 +++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Example/Web3supportBrowser/Web3support/AppDelegate.swift b/Example/Web3supportBrowser/Web3support/AppDelegate.swift index fe602aa9f..e2553d695 100644 --- a/Example/Web3supportBrowser/Web3support/AppDelegate.swift +++ b/Example/Web3supportBrowser/Web3support/AppDelegate.swift @@ -11,7 +11,6 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true diff --git a/Example/Web3supportBrowser/Web3support/ViewController/BrowserViewController.swift b/Example/Web3supportBrowser/Web3support/ViewController/BrowserViewController.swift index 91a591d1e..dad88bbe1 100644 --- a/Example/Web3supportBrowser/Web3support/ViewController/BrowserViewController.swift +++ b/Example/Web3supportBrowser/Web3support/ViewController/BrowserViewController.swift @@ -6,7 +6,6 @@ // import UIKit - import web3swift import WebKit @@ -26,15 +25,15 @@ open class BrowserViewController: UIViewController { let date = NSDate(timeIntervalSince1970: 0) WKWebsiteDataStore.default().removeData(ofTypes: websiteDataTypes as! Set, modifiedSince: date as Date, completionHandler:{ }) - let webView = WKWebView( + let webKitView = WKWebView( frame: .zero, configuration: self.config ) - webView.allowsBackForwardNavigationGestures = true - webView.scrollView.isScrollEnabled = true - webView.navigationDelegate = self - webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled") - return webView + webKitView.allowsBackForwardNavigationGestures = true + webKitView.scrollView.isScrollEnabled = true + webKitView.navigationDelegate = self + webKitView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled") + return webKitView }() lazy var config: WKWebViewConfiguration = { @@ -119,7 +118,7 @@ open class BrowserViewController: UIViewController { extension BrowserViewController: WKNavigationDelegate { public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { - + print("Navigation is completed") } }