Skip to content

Commit

Permalink
fix udn header issue
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyleaf9999 committed Jun 19, 2020
1 parent a053f4f commit 2237373
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ios/Classes/InAppWebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,11 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi

let isForMainFrame = navigationAction.targetFrame?.isMainFrame ?? false
let socialLogin = SocialLogin(url: url)
if url.host?.contains("udn") == true {
if #available(iOS 9.0, *) {
customUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
}
}
if case .google = socialLogin {
decisionHandler(.cancel)
_ = createSocialLoginWindow(from: webView,
Expand Down

0 comments on commit 2237373

Please sign in to comment.