From d39e0ced560b92e37bcc551c4b7a8f7f1dfa314e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E5=A2=9E=E5=BC=BA?= <2233547477@qq.com>
Date: Wed, 10 Mar 2021 14:51:22 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Diosbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ios/Classes/InAppWebView.swift | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ios/Classes/InAppWebView.swift b/ios/Classes/InAppWebView.swift
index 264c6fd..81270c6 100755
--- a/ios/Classes/InAppWebView.swift
+++ b/ios/Classes/InAppWebView.swift
@@ -887,6 +887,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
         self.longPressRecognizer = UILongPressGestureRecognizer()
         self.longPressRecognizer!.delegate = self
         self.longPressRecognizer!.addTarget(self, action: #selector(longPressGestureDetected))
+        
     }
     
     override public var frame: CGRect {
@@ -1358,6 +1359,9 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
                 } else if options.cacheEnabled {
                     configuration.websiteDataStore = WKWebsiteDataStore.default()
                 }
+                if let userAgent = options.applicationNameForUserAgent as? String{
+                    configuration.applicationNameForUserAgent = userAgent;
+                }
             }
             
             if #available(iOS 10.0, *) {
@@ -1393,6 +1397,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
                         configuration.websiteDataStore.httpCookieStore.setCookie(cookie, completionHandler: nil)
                     }
                 }
+                
             }
         }
         
-- 
2.26.2