diff options
Diffstat (limited to 'iPhone/CordovaLib/Classes/CDVEcho.m')
-rwxr-xr-x | iPhone/CordovaLib/Classes/CDVEcho.m | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/iPhone/CordovaLib/Classes/CDVEcho.m b/iPhone/CordovaLib/Classes/CDVEcho.m index 9cda957..916e315 100755 --- a/iPhone/CordovaLib/Classes/CDVEcho.m +++ b/iPhone/CordovaLib/Classes/CDVEcho.m @@ -24,7 +24,8 @@ - (void)echo:(CDVInvokedUrlCommand*)command { - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:[command.arguments objectAtIndex:0]]; + id message = [command.arguments objectAtIndex:0]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; } @@ -36,9 +37,18 @@ - (void)echoAsync:(CDVInvokedUrlCommand*)command { - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:[command.arguments objectAtIndex:0]]; + id message = [command.arguments objectAtIndex:0]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; [self performSelector:@selector(echoAsyncHelper:) withObject:[NSArray arrayWithObjects:pluginResult, command.callbackId, nil] afterDelay:0]; } +- (void)echoArrayBuffer:(CDVInvokedUrlCommand*)command +{ + id message = [command.arguments objectAtIndex:0]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArrayBuffer:message]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + @end |