I have WKWebView application, and i want to stop it from parsing phone numbers and links in texts, i set
webView.configuration.dataDetectorTypes = [
WKDataDetectorTypes.address
];
before actually loading page, but it doesn't help, full code looks like
let url = URL(string: link)
var urlRequest = URLRequest(url: url!);
var UUID = String();
if ASIdentifierManager.shared().isAdvertisingTrackingEnabled {
UUID = ASIdentifierManager.shared().advertisingIdentifier.uuidString;
}
webView.customUserAgent = String(
format: "%@/%@ %@ EmbeddedBrowser DeviceUID: %@",
getAppName(),
getAppVersion(),
UIWebView().stringByEvaluatingJavaScript(from: "navigator.userAgent")!,
UUID
);
webView.configuration.dataDetectorTypes = [
WKDataDetectorTypes.address
];
webView.navigationDelegate = self;
webView.uiDelegate = self;
webView.stopLoading();
webView.load(urlRequest);