Event when App Exits (swipe up on app)

Is it possible to fire an event (logout) when the user fully exits the app. I’m not talking about switching to another app. I mean when you swipe up on the app to kill it on iOS.

I am using ionic 3.9.2 ionic-angular and I’m creating a native app.

Thanks