cordova-plugin-wkwebview-engine
cordova-plugin-wkwebview-engine copied to clipboard
deviceready has not fired after 5 seconds.
Hi Ionic team,
Sometimes When I re-open the app on iOS device, cordova is not executed.

My app is loading my remote Ionic app:
function onDeviceReady() {
// Handle the Cordova pause and resume events
document.addEventListener( 'pause', onPause.bind( this ), false );
document.addEventListener('resume', onResume.bind(this), false);
// Check we've connection to the internet
if (navigator.connection.type === Connection.NONE) {
navigator.notification.alert('An Internet connection is required to continue');
} else {
window.location.replace("https://mywebsite.com");
//document.getElementById("btn_scan").addEventListener("click", scan);
}
// TODO: Cordova has been loaded. Perform any initialization that requires Cordova here.
};
I'm using the following content-security-policy:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap://* file://* https://*.mywebsite.com/* https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
And my configuration:
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-navigation href="https://*. mywebsite.com/*" />
<allow-navigation href="http://localhost:8080/*" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="Orientation" value="all" />
<preference name="deployment-target" value="9.3" />
<preference name="SplashScreen" value="screen" />
<preference name="windows-target-version" value="10.0" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#FFFFFF" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="DisallowOverscroll" value="true" />
<preference name="UIWebViewBounce" value="false" />
<preference name="xwalkVersion" value="xwalk_core_library_beta:18+" />
<preference name="xwalkCommandLine" value="--disable-pull-to-refresh-effect" />
<preference name="xwalkMode" value="embedded" />
<preference name="xwalkMultipleApk" value="true" />
<preference name="CrosswalkAnimatable" value="true" />
<preference name="android-minSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="23" />
<preference name="KeepRunning" value="True" />
<preference name="ShowTitle" value="True" />
<preference name="InAppBrowserStorageEnabled" value="True" />
<preference name="EnableViewportScale" value="true" />
<preference name="SuppressesIncrementalRendering" value="True" />
<preference name="Fullscreen" value="False" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<plugin name="cordova-plugin-whitelist" version="1" />
<plugin name="ionic-plugin-keyboard" version="2.2.1" />
<plugin name="cordova-plugin-network-information" version="1.2.0" />
<plugin name="cordova-plugin-dialogs" version="1.2.0" />
<plugin name="cordova-plugin-device-orientation" version="1.0.2" />
<plugin name="cordova-plugin-statusbar" spec="~2.1.0" />
<plugin name="cordova-plugin-crosswalk-webview" src="https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview" version="1.6.1" />
<plugin name="cordova-plugin-compat" version="1.0.0" />
<plugin name="cordova-plugin-ms-azure-mobile-apps" version="2.0.0-beta4" />
<plugin name="cordova-plugin-inappbrowser" version="1.4.0" />
<plugin name="com.telerik.plugins.nativepagetransitions" src="https://github.com/Telerik-Verified-Plugins/NativePageTransitions" version="0.6.5" />
<plugin name="cordova-plugin-camera" version="2.3.0" />
<plugin name="cordova-plugin-file-transfer" version="1.6.0" />
<plugin name="cordova-plugin-file" version="4.3.0" />
<plugin name="cordova-plugin-media-capture" version="1.4.0" />
<plugin name="cordova-plugin-photokandy-video-thumbnail" src="https://github.com/photokandyStudios/PKVideoThumbnail" version="2.1.0" />
<plugin name="cordova-plugin-app-version" src="https://github.com/whiteoctober/cordova-plugin-app-version.git" version="0.1.9" />
<plugin name="phonegap-plugin-push" version="1.8.2">
<variable name="SENDER_ID" value="..." />
</plugin>
<plugin name="phonegap-plugin-barcodescanner" version="6.0.2" src="https://github.com/phonegap/phonegap-plugin-barcodescanner">
<variable name="CAMERA_USAGE_DESCRIPTION" value="To scan barcodes" />
</plugin>
<plugin name="cordova-plugin-crosswalk-webview" spec="~2.3.0" />
<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine" />
Any help is really appreciated. Thanks in advance, Nicholls
Sorry, my question in related to your config file. I noticed you have both cordova-plugin-crosswalk-webview and cordova-plugin-wkwebview-engine plugins installed. Doesnt cordova-plugin-crosswalk-webview already includes webview for iOS platform? Isint your installation having 2 webviews now for iOS? Just curious.