From 217d63292fe85028b08d1564766d8c09593b4b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Katzer?= Date: Sun, 24 Jul 2016 13:49:23 +0200 Subject: [PATCH] Fix isAvailable to return empty list on iOS --- src/ios/APPPrinter.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ios/APPPrinter.m b/src/ios/APPPrinter.m index e741994..601be16 100755 --- a/src/ios/APPPrinter.m +++ b/src/ios/APPPrinter.m @@ -42,10 +42,11 @@ { [self.commandDelegate runInBackground:^{ CDVPluginResult* pluginResult; - BOOL isAvailable = [self isPrintingAvailable]; - + BOOL isAvailable = [self isPrintingAvailable]; + NSArray *multipart = @[[NSNumber numberWithBool:isAvailable], @[]]; + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK - messageAsBool:isAvailable]; + messageAsMultipart:multipart]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; @@ -139,8 +140,8 @@ printInfo.duplex = duplexMode; printInfo.jobName = [settings objectForKey:@"name"]; - controller.printInfo = printInfo; - + controller.printInfo = printInfo; + controller.showsPageRange = ![[settings objectForKey:@"hidePageRange"] boolValue]; controller.showsNumberOfCopies = ![[settings objectForKey:@"hideNumberOfCopies"] boolValue]; controller.showsPaperSelectionForLoadedPapers = ![[settings objectForKey:@"hidePaperFormat"] boolValue];