I'm working on Background Task using this link it's working in android when app in background state and terminate state but not in iOS. Right now it's working only when user open the application.
But in my scenario after 5mins user will use the app or not, directly call Logout method and delete the data in both the states(Background&Terminate).