ERROR: Method 'methodName' not defined in Plugin 'plugin' - Phonegap 3.0 iOS
cordova, ios, iphone, objective-c
Solution
If you tru use "old" plugin in phonegap 3.0 you should write hack in native code of plugin method. For example:
- (void)register:(CDVInvokedUrlCommand*)command
{
self.callbackId = command.callbackId;
NSArray *arguments = command.arguments;
NSDictionary *options = [arguments objectAtIndex:0];
instead of
- (void)register:(NSMutableArray *)arguments withDict:(NSMutableDictionary *)options
self.callbackId = [arguments pop];
Problem
I'm trying to develop an iOS App using phonegap 3.0. The app uses sharekit plugin and GAPlugin for phonegap, and it was working when I was using phonegap 2.9 After the upgrade it compiles and when I try to access the functions in the plugin, it gives me this error. ``` ERROR: Method 'share:' not defined in Plugin 'ShareKitPlugin' 2013-07-22 22:05:06.976 -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [ "INVALID", "ShareKitPlugin", "share", [ "test", "http:\/\/www.test.com" ] ] ERROR: Method 'initGA:' not defined in Plugin 'GAPlugin' 2013-07-22 22:05:06.977 -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [ "GAPlugin1900170756", "GAPlugin", "initGA", [ "UA-XXXXXX-11", 10 ] ] ```