Skip to content

Commit

Permalink
Dapp Isseue solved Example with Issue number web3swift-team#338
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravi Ranjan authored and Ravi Ranjan committed Aug 10, 2021
1 parent 0d13166 commit d91e444
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion Example/Web3supportBrowser/Web3support/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import UIKit

import web3swift
import WebKit

Expand All @@ -26,15 +25,15 @@ open class BrowserViewController: UIViewController {
let date = NSDate(timeIntervalSince1970: 0)

WKWebsiteDataStore.default().removeData(ofTypes: websiteDataTypes as! Set<String>, 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 = {
Expand Down Expand Up @@ -119,7 +118,7 @@ open class BrowserViewController: UIViewController {

extension BrowserViewController: WKNavigationDelegate {
public func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {

print("Navigation is completed")
}
}

Expand Down

0 comments on commit d91e444

Please sign in to comment.