From e82331a63a48b760022516e43440d02e63183cd5 Mon Sep 17 00:00:00 2001 From: iReka Soft Date: Sun, 12 May 2024 06:14:50 +0800 Subject: [PATCH] Update ThePrinterWrapper.m (#149) --- ios/ThePrinterWrapper.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/ThePrinterWrapper.m b/ios/ThePrinterWrapper.m index d240703..b82139a 100644 --- a/ios/ThePrinterWrapper.m +++ b/ios/ThePrinterWrapper.m @@ -149,7 +149,7 @@ -(void) connectPrinter:(nonnull NSString*)objid } else { [thePrinter setBusy:PRINTER_CONNECTING]; NSLog(@"connecting to printer %@", objid); - const connectResult = [thePrinter connect:EPOS2_PARAM_DEFAULT startMonitor:true]; + int const connectResult = [thePrinter connect:EPOS2_PARAM_DEFAULT startMonitor:true]; if (connectResult == EPOS2_SUCCESS) { onSuccess([NSString stringWithFormat:@"%d", connectResult]); } else { @@ -166,9 +166,9 @@ -(void) connectPrinter:(nonnull NSString*)objid withResolver:(RCTPromiseResolveBlock)resolve withRejecter:(RCTPromiseRejectBlock)reject) { - const disconnectResult = [self disconnectPrinter:target]; + int const disconnectResult = [self disconnectPrinter:target]; if (disconnectResult == EPOS2_SUCCESS) { - const diallocResult = [self deallocPrinter:target]; + int const diallocResult = [self deallocPrinter:target]; if (diallocResult == EPOS2_SUCCESS) { resolve([NSString stringWithFormat:@"%d", diallocResult]); } else {