Cordova is a great open source framework. But it is free, which means you cannot expect too much from it. The following are two ios debug issues to make it work properly
1. To avoid webview thread lock crash:
In cordova.js, find method iOSExec.nativeCallback at line 1009, and replace it with the following code
2. To avoid missing plugin call
In cordova.js line 949, change it to following
1. To avoid webview thread lock crash:
In cordova.js, find method iOSExec.nativeCallback at line 1009, and replace it with the following code
iOSExec.nativeCallback = function(callbackId, status, message, keepCallback) {
function f0(){
return iOSExec.nativeEvalAndFetch(function() {
var success = status === 0 || status === 1;
var args = convertMessageToArgsNativeToJs(message);
cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
});
}
setTimeout(f0, 100);
};
2. To avoid missing plugin call
In cordova.js line 949, change it to following
if (true || !isInContextOfEvalJs && commandQueue.length == 1) {
if (bridgeMode != jsToNativeModes.IFRAME_NAV) {
// This prevents sending an XHR when there is already one being sent.
// This should happen only in rare circumstances (refer to unit tests).
if (execXhr && execXhr.readyState != 4) {
execXhr = null;
}
No comments:
Post a Comment