You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2026/06/22 05:49:02 UTC

(cordova-ios) branch master updated: fix: dont call nativeFetchMessages if not implemented (#1643)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git


The following commit(s) were added to refs/heads/master by this push:
     new 355f39be fix: dont call nativeFetchMessages if not implemented (#1643)
355f39be is described below

commit 355f39be37751030250f5c0c25c80865aafd4261
Author: エリス <er...@users.noreply.github.com>
AuthorDate: Mon Jun 22 14:48:56 2026 +0900

    fix: dont call nativeFetchMessages if not implemented (#1643)
---
 cordova-js-src/exec.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cordova-js-src/exec.js b/cordova-js-src/exec.js
index fea6264d..2eccdf99 100644
--- a/cordova-js-src/exec.js
+++ b/cordova-js-src/exec.js
@@ -143,7 +143,14 @@ function execProxy () {
 }
 
 execProxy.nativeFetchMessages = function () {
-    return cordovaExec().nativeFetchMessages.apply(null, arguments);
+    // The built-in WKWebView-based WebView does not implement `nativeFetchMessages`
+    // since it uses `postMessage` instead.
+    // The `nativeFetchMessages` logic is kept guarded in case a custom pluggable
+    // WebView engine still implements it. This logic is apart of the old JS/native
+    // command queue dispatching/polling path.
+    if (cordovaExec().nativeFetchMessages) {
+        return cordovaExec().nativeFetchMessages.apply(null, arguments);
+    }
 };
 
 execProxy.nativeEvalAndFetch = function () {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org