Search code examples
ioscordovamobilemobile-safariwkwebview

How to check if phonegap app using WKWebview


Could not find information. I built pg app with 'cordova-plugin-wkwebview-engine'.

How to check if phonegap web app on ios 9.2 is really using WKWebview? Could not find info how userAgent string should look like for WKWebView.


Solution

  • Previous answer doesn't work on iOS 10, but you can use this code

    if (window.webkit) {
        //WKWebView            
    }
    

    Old answer: You can check for indexedDB

    if (window.indexedDB) {
        //WKWebView
    }