aboutsummaryrefslogtreecommitdiffstats
path: root/iPhone/CordovaLib/Classes/CDVEcho.m
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-03-25 15:57:26 +0000
committerStruan Donald <struan@exo.org.uk>2013-03-25 17:13:56 +0000
commit73e3d5d4077636487f07be1beff3b2714ee2b276 (patch)
tree4b4529f36ab68ec7c2a9e51bcfafbd57d9336cc8 /iPhone/CordovaLib/Classes/CDVEcho.m
parente5d7b3b62be5025f31c39b50ea3955398bc7cf40 (diff)
upgrade to phonegap 2.5 for ios
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