App is restarting from the splash screen when entering from background to foreground.

Hai,

My app is restarting from the splash screen when it should show the previous screen while entering from the background to the foreground. Eg. While my app is on the OTP page, I make my app in the background & open the messages app, then I open my app to the foreground, this time instead of showing the OTP screen, it restarts the app from the splash screen.

Note

  1. The live app does not cause this issue; there is no change for t dev app.
  2. I double-checked if App Delegate functions or NotificationCenter for calling willEnterForegroundNotification or didBecomeActiveNotification and made sure it does not cause the restart of the app from the splash screen.
  3. It works perfectly in small-screen iphones like 6s and in simulators.

Am using Xcode - Version 14.2 (14C18) Test Device - iOS 16.3.1

Please let me know what to do.

App is restarting from the splash screen when entering from background to foreground.
 
 
Q