I have a business need to be able to customize the UserAgent for an embedded UIWebView. (For instance, I\'d like the server to respond differently if, say, a user is using
Apple will soon stop accepting apps with UIWebView. Find below for how you could change the user agent in WKWebView.
let config = WKWebViewConfiguration() config.applicationNameForUserAgent = "My iOS app" webView = WKWebView(frame: , configuration: config)