Fix isAvailable to return empty list on iOS

This commit is contained in:
Sebastián Katzer 2016-07-24 13:49:23 +02:00
parent 5c6c646e6d
commit 217d63292f

View File

@ -43,9 +43,10 @@
[self.commandDelegate runInBackground:^{ [self.commandDelegate runInBackground:^{
CDVPluginResult* pluginResult; CDVPluginResult* pluginResult;
BOOL isAvailable = [self isPrintingAvailable]; BOOL isAvailable = [self isPrintingAvailable];
NSArray *multipart = @[[NSNumber numberWithBool:isAvailable], @[]];
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
messageAsBool:isAvailable]; messageAsMultipart:multipart];
[self.commandDelegate sendPluginResult:pluginResult [self.commandDelegate sendPluginResult:pluginResult
callbackId:command.callbackId]; callbackId:command.callbackId];