I'm trying for two weeks set the user agent of my app but no success.
The answer that I found in all places is the below but it doesn't work for me.
If someone know how to do it or give me the right direction or where I'm making the mistake pleas help me.
override func viewDidLoad() {
super.viewDidLoad()
webView = WKWebView(frame: view.frame)
webView.customUserAgent = "Mozilla/5.0 (iPhone; CPU OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B100/TansoDL"
webViewContainer.addSubview(webView)
webView.navigationDelegate = self
}