IPhone XR, batchPushReceived is not triggered when application was totally closed.
ozgeekemen opened this issue · 5 comments
I saw the error "[BatchCordovaCallback] Not sending callback to Batch, _setupCallback doesn't seem to have been called. Something bad happened." on device console.
After debugging the code, I deleted the comment from this line
[self.commandDelegate evalJs:@"batch._setupCallback()"];
from BatchCordovaPlugin.m, it works well.
I don't want to create another bug, so my question is why this line was commented at initially?
Hello,
Thanks for your report.
It was commented because it was only there for debubgging purposes.
The thing is that BatchPushReceivedNotification should not fire before Batch has been setup, and the callback should be there. The callback is right: something wrong is happening.
Maybe a change in the native component has triggered this, but we will have to investigate further.
Glad you found a workaround!
Thanks for your quick response. Maybe more detail will help for your debugging in future.
In the documentation, it says that batchPushReceived will be triggered when batch will be ready. It works as expected on Iphone 7; but not Iphone XR, event is not triggered.
Batch will NOT emit this event until it is started. As soon as it is started, it will send you the payload of the push that started the app, if there is one.
Are both phones on the same iOS version?
Yes, same version, latest for the moment, 12.3.1
Hi,
This should be fixed in the 3.0.0-beta.1 version of the plugin