Add the user agent in your WKWebView.
Last active
December 16, 2016 07:44
-
-
Save pokk/6ae2dba60eff02f6c19f5be881fbdc27 to your computer and use it in GitHub Desktop.
Add the user agent in your WKWebView.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.wkwvTantra!.evaluateJavaScript("navigator.userAgent") { res, error in | |
if let userAgent = res as? String { | |
self.wkwvTantra!.customUserAgent = userAgent + " XXX" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment