Hello to all,
I'm here to show an issues that I encountered working with modal window.
The issue was that serial port received data but not notify to delegate until the modal window stops. The guilty command is -(void)receiveData:(NSData *)data in ORSSerialPort.m
I replaced dispatch_async block with [self performSelectorOnMainThread:@selector(notifyDelegate:) withObject:data waitUntilDone:NO]; and added
-(void) notifyDelegate:(NSData *)data { if ([self.delegate respondsToSelector:@selector(serialPort:didReceiveData:)]) { [self.delegate serialPort:self didReceiveData:data]; } }
Hope this can help and the fix will be implemented in next releases.
Hello to all, I'm here to show an issues that I encountered working with modal window. The issue was that serial port received data but not notify to delegate until the modal window stops. The guilty command is
-(void)receiveData:(NSData *)data
in ORSSerialPort.mI replaced
dispatch_async
block with[self performSelectorOnMainThread:@selector(notifyDelegate:) withObject:data waitUntilDone:NO];
and added-(void) notifyDelegate:(NSData *)data { if ([self.delegate respondsToSelector:@selector(serialPort:didReceiveData:)]) { [self.delegate serialPort:self didReceiveData:data]; } }
Hope this can help and the fix will be implemented in next releases.