4 Replies Latest reply on Jan 17, 2018 9:39 AM by f02d3ac4-9d47-4002-84fa-27e55644f626

    iMZ220-MfiBtPrinterConnection::close is slow on IOS10


      When we print a simple label from IOS10 device, the print is instant, but [connection close] call takes several seconds to complete. The same code/library/app works without any delay on older IOS8 phones.


      Sample code for printing:



      (NSInteger) printFormat:(NSString*)formatString error:(NSError **)error


            id<ZebraPrinterConnection, NSObject> connection = [[MfiBtPrinterConnection alloc] initWithSerialNumber:[self serialNumber]];

           BOOL success = [connection open]; //instant

           BOOL isConnected = [connection isConnected]; //instant

           NSInteger bytes = [connection write:[formatString dataUsingEncoding:NSUTF8StringEncoding] error:error]; //instant and print is done

           [connection close]; //3-7seconds to close connection!!!

           return bytes;