don/cordova-plugin-hello

How can I get multiple responses for one request?

Closed this issue · 2 comments

In my application, I called this method
hello.greet("World", success, failure);
So I get only one response from the native, even I added a for loop to send multiple responses on iOS side.
for (int i = 0; i <=5; i++) { [self.commandDelegate sendPluginResult:result callbackId:callbackId]; }

don commented

If you're going to call a callback multiple times, you need to set setKeepCallbackAsBool to TRUE on the PluginResult before sending. See https://github.com/don/BluetoothSerial/blob/master/src/ios/MEGBluetoothSerial.m#L240

Its working fine 👍
Thank you.