vita-it commented on issue #1298:
URL: https://github.com/apache/cordova-ios/issues/1298#issuecomment-1498745266

   > > Can you try with UIWebView? Based on the testing i've done today, this 
seems to be specific to UIWebView which is what Cordova uses out of the box
   > 
   > Cordova hasn't used UIWebView by default since 2019 when Apple updated 
requirements to use WKWebView.
   
   As I can see in Cordova source code there are both WKWebView and UIWebView 
in if/else clause 
   
   `if ((gOriginalUserAgent == nil) || cachedValueIsOld) {
    #if WK_WEB_VIEW_ONLY
               WKWebView* sampleWebView = [[WKWebView alloc] 
initWithFrame:CGRectZero];
    #else
               UIWebView* sampleWebView = [[UIWebView alloc] 
initWithFrame:CGRectZero];
   #endif
               gOriginalUserAgent = [sampleWebView 
stringByEvaluatingJavaScriptFromString:@"navigator.userAgent"];
   
               [userDefaults setObject:gOriginalUserAgent 
forKey:kCdvUserAgentKey];
               [userDefaults setObject:systemAndLocale 
forKey:kCdvUserAgentVersionKey];
   
               [userDefaults synchronize];
           }`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to