Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 759
oiledCode Avatar asked Sep 21 '12 10:09

oiledCode


1 Answers

cordova.exec

can be invoked after

deviceReady()

has fired.

like image 70
最白目 Avatar answered Oct 05 '22 20:10

最白目