aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/CordovaLib/Classes/CDVEcho.m
diff options
context:
space:
mode:
Diffstat (limited to 'iPhone/CordovaLib/Classes/CDVEcho.m')
-rwxr-xr-xiPhone/CordovaLib/Classes/CDVEcho.m14
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