skip to Main Content

We would like to track when the app is terminated by a user so we are using ‘applicationWillTerminate’ method. sometimes it’s working fine but sometimes we can not store data because the app is terminated so is there any other way to track that.

We have tried ‘applicationWillTerminate’ method. We can another method if there is any.

2

Answers


  1. Try using applicationDidEnterBackground function.

    If you check the iOS app life cycle your app didn’t get directly in suspended state.

    According to Apple:

    When the user dismisses your app’s UI, UIKit moves the associated scene to the background state and eventually to the suspended state.

    you can read more details about Managing your app’s life cycle here.

    check this image for quick look enter image description here

    Login or Signup to reply.
  2. For my suggestion, you can try Firebase Crashlytics for tracking the app terminated by the user.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search