Commit d39e0ced authored by 李增强's avatar 李增强

修复iosbug

parent 9c3d76dc
......@@ -887,6 +887,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
self.longPressRecognizer = UILongPressGestureRecognizer()
self.longPressRecognizer!.delegate = self
self.longPressRecognizer!.addTarget(self, action: #selector(longPressGestureDetected))
}
override public var frame: CGRect {
......@@ -1358,6 +1359,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
} else if options.cacheEnabled {
configuration.websiteDataStore = WKWebsiteDataStore.default()
}
if let userAgent = options.applicationNameForUserAgent as? String{
configuration.applicationNameForUserAgent = userAgent;
}
}
if #available(iOS 10.0, *) {
......@@ -1393,6 +1397,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
configuration.websiteDataStore.httpCookieStore.setCookie(cookie, completionHandler: nil)
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment