2

Im currently using firebase, when the app is uninstall and the reinstall firebase still have the user log in how can I sign the user out when the app is uninstall.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
SwiftER
  • 1,235
  • 4
  • 17
  • 40

1 Answers1

0

Ideally, there would be a delegate method called before the app is deleted, but currently there is not, as there is no way to track an app that is not running. You could run .unauth() in the applicationWillTerminate in the App Delegate file, but that would log the user out every time the app is killed.

Why do you need to log out the user? There are a few options to simulate this.

Jake Braden
  • 489
  • 5
  • 15
  • 'applicationWillTerminate' does that that monitor if the app is no longer running, but I keep track of the user activity on a json file if the app is delete i would like to update json. I dont want the use to be able to re-log in anytime the app is delete. – SwiftER Aug 26 '16 at 04:26
  • @pprevalon Does your app support push notification? If so then if the user deleted the app then your backend service will come to know the inactive device token through APNS feedback service. Take a look at this question [APNS feedback for inactive tokens](http://stackoverflow.com/questions/21592576/how-to-detect-user-uninstalled-ios-app-i-need-push-serious-notification-i-don) – rootcoder Aug 26 '16 at 06:01