From 3b65ae85b758ef8d23ab5b8cb6a7c10a46b498d8 Mon Sep 17 00:00:00 2001 From: "brian.lin" Date: Tue, 7 Jul 2020 17:29:37 +0800 Subject: [PATCH] assign applicationNameForUserAgent to WKWebViewConfiguration --- ios/Classes/InAppWebView.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/Classes/InAppWebView.swift b/ios/Classes/InAppWebView.swift index f1e27903f..d9b1ef846 100755 --- a/ios/Classes/InAppWebView.swift +++ b/ios/Classes/InAppWebView.swift @@ -1077,6 +1077,12 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi } } } + + if #available(iOS 9.0, *) { + if let applicationNameForUserAgent = options?.applicationNameForUserAgent, !applicationNameForUserAgent.isEmpty { + configuration.applicationNameForUserAgent = applicationNameForUserAgent + } + } return configuration }