So previously with UIWebView() I can get the user agent with,
UIWebView().stringByEvaluatingJavaScript(from: "navigator.userAgent")!