apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 986 forks source link

Failing to broadcast 'pause' event when app enters background #1384

Open skorsi2 opened 6 months ago

skorsi2 commented 6 months ago

Bug Report

Problem

We've noticed on at least one reported occasion, Cordova is failing to broadcast the 'pause' event as the application enters the background.

What is expected to happen?

We would expect this 'pause' event to trigger. This allows the application to close its open websocket(s).

What does actually happen?

No 'pause' event is broadcast to the web layer. Likewise, we keep the websocket(s) open. We will however see the 'resume' even when the application is brought into the foreground. This spins up a new websocket(s). The outcome is inconsistent behavior in the application as it concerns communication to the domain layer; this can timeout or be non-functional when in this state.

Information

This is for an iOS application. It's unknown when this behavior was first introduced, but it was only recently identified on our end. It was reported using an iPad Pro 2nd Gen (12.9"). The iOS version was not reported.

Command or Code

n/a

Environment, Platform, Device

iOS, iPad Pro 2nd Gen (12.9")

Version information

rel/6.0.0

Checklist