How to reproduce WebContent process termination

Many of my app users have been reporting the issue that my app stops at white screen when it back to foreground from background. My app uses Cordova.

Finally I could reproduce the issue by killing 2 webview processes by using Acitivity Monitor of MacOS.

Here’s the procedure.

  1. Start app with XCode Simulator(ex: iPhone12 mini).
  2. Get app switch to background (manually change the foreground screen to home screen).
  3. Kill 2 processes(com.apple.Webkit.networking, com.apple.Webkit.WebContent) of app by using Activity Monitor. Clicking "Termination" or “Forced termination“.
  4. Back the app to foreground.

The app shows white screen and no way to control with my Javascript code.

Is the above procedure correct? If not, please let me know how I can reproduce the issue that iOS terminates background app's processes.

How to reproduce WebContent process termination
 
 
Q