I'm trying to make a custom Cordova plugin, and I'd like to make a method in Objective-C that calls the javascript function alert('text');
This is how I normally do it, and it works well.
- (void)myMethod:(CDVInvokedUrlCommand*)command
{
[self.commandDelegate evalJs:@"alert('text');"];
}
The problem is that I need to do the same thing using a class method. If I change the - to +, I get an error message.
+ (void)myMethod:(CDVInvokedUrlCommand*)command
{
[self.commandDelegate evalJs:@"alert('text');"];
}