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

1,633 views
Skip to first unread message

Elio D'antoni

unread,
Sep 21, 2012, 6:22:06 AM9/21/12
to phon...@googlegroups.com

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?

Padma Raju

unread,
Sep 21, 2012, 2:10:49 PM9/21/12
to phon...@googlegroups.com
Just try with this:

cordova.exec(function(arg){},function(error){},'MyPlugin','myMethod',['parameter']);
-- 
Best Regards,
SPRaju


--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com

Kerri Shotts

unread,
Sep 21, 2012, 2:13:12 PM9/21/12
to phon...@googlegroups.com
Part of me is wondering why you aren't just passing null to the success/failure functions if you aren't going to do anything with them?

So:

cordova.exec (null, null, …);



_________________________________________
~Kerri Shotts, photoKandy Studios LLC
   Wanna be our neighbor? Our Facebook page & Twitter feed.

--
Reply all
Reply to author
Forward
0 new messages