cordova ios : cordova.exec() undefined is not a function

此生再无相见时 提交于 2019-12-06 05:00:20

问题


I'm developing an iOS app using cordova(1.9). I've some custom iOS plugins to make my app do some stuff. Now I'm facing a problem, sometime when I call :

cordova.exec(function(){},function(){},'MyPlugin','myMethod',['parameter']);

The app throws this exception :

TypeError: 'undefined' is not a function (evaluating 'cordova.exec(function(){},function(){},'WDMessageDispatcher','sendMessage',['showCategoriesList'])')

The Plugin was developed following the documentation and it works but not everytime. I don't really understand why. Someone else experienced the same error?


回答1:


cordova.exec

can be invoked after

deviceReady()

has fired.



来源:https://stackoverflow.com/questions/12528464/cordova-ios-cordova-exec-undefined-is-not-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!