dpogue commented on code in PR #1643:
URL: https://github.com/apache/cordova-ios/pull/1643#discussion_r3440393467


##########
cordova-js-src/exec.js:
##########
@@ -143,7 +143,9 @@ function execProxy () {
 }
 
 execProxy.nativeFetchMessages = function () {
-    return cordovaExec().nativeFetchMessages.apply(null, arguments);
+    if (cordovaExec().nativeFetchMessages) {

Review Comment:
   `execProxy.nativeFetchMessages` gets called from public API of 
CDVCommandQueue's `fetchCommandsFromJs`: 
https://github.com/apache/cordova-ios/blob/c20cdc93b77fc69720614122776d5ce27ea4f75e/CordovaLib/Classes/Public/CDVCommandQueue.m#L94-L109
   
   That method isn't used by Cordova iOS itself, but was previously used by the 
UIWebView implementation, and is still available for plugins to call.
   
   In particular, there are 3rd party plugins that provide UIWebView as a 
pluggable webview implementation (which is perfectly valid for enterprise apps 
that don't go through the AppStore), and they still rely on this method: 
https://github.com/bpresles/cordova-plugin-uiwebview-engine/blob/1fb24fd2569745c281c6f636bb9ae2bae769e746/src/ios/BPRUIWebViewNavigationDelegate.m#L111
   
   They also provide the JavaScript implementation for the 
`nativeFetchMessages` method: 
https://github.com/bpresles/cordova-plugin-uiwebview-engine/blob/1fb24fd2569745c281c6f636bb9ae2bae769e746/src/www/ios/ios-uiwebview-exec.js#L201-L214



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to