I recently upgraded my app to WKWebView, and since then my native plugins have stopped working. Specifically, the Camera and Geolocation plugin has stopped working. The worst thing is that no errors are being thrown. I tried console logging every step and apparently, the promise geolocation.getCurrentPosition() is never being resolved.
Also, I’m getting a warning stating my plugins are in an inconsistent state and device ready is not fired within 5000ms.
I tried the following things:
My app was working fine before upgrading. I upgraded to WKWebView because one feature wasn’t working on iOS. Ever since I did that my native plugins have stopped working. Is there any way to fix this. I have a git repository, and I can rollback this commit, but I think the problem is with the files that are in gitignore.
I managed to fix it by uninstalling the cordova-plugin-ionic-webview with the following command.
cordova plugin rm cordova-plugin-ionic-webview
After that I had some issues with Firebase Authentication so I ran the following command:
cordova plugin add cordova-plugin-whitelist
I don't know what was causing the issue yet. But apparently WKWebView doesn't work with native plugins on Android. Now I need to find a workaround to add WKWebView on iOS.