diff options
author | Struan Donald <struan@exo.org.uk> | 2013-03-25 15:57:26 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-03-25 17:13:56 +0000 |
commit | 73e3d5d4077636487f07be1beff3b2714ee2b276 (patch) | |
tree | 4b4529f36ab68ec7c2a9e51bcfafbd57d9336cc8 /iPhone/CordovaLib/Classes/CDVEcho.m | |
parent | e5d7b3b62be5025f31c39b50ea3955398bc7cf40 (diff) |
upgrade to phonegap 2.5 for ios
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 |