I create anonymous user in my iOS app and I wonder if when the app update, the User anonymous session will persist or not? Because app is deleted but not everything when updating an app (UserDefault persists for example)
- 565,676
- 79
- 828
- 807
- 281
- 1
- 3
- 16
2 Answers
The Firebase Authentication user will remain signed in when you update the app. I recommend that you test this: any time you rebuild-and-reinstall the app from Android Studio is essentially what an upgrade through the Play store does.
When you uninstall the app, the Firebase Authentication user data is deleted too. When using anonymous authentication, this means that the UID is lost and cannot be reclaimed after reinstalling the app. If it is a requirement for your app that the user can continue after uninstall/reinstall, you should allow them to sign in with credentials that they can repeat across such a reinstall (i.e. any other provider where they actually identify themselves).
- 565,676
- 79
- 828
- 807
-
Thank you very much Frank, Firebase is clearly amazing. I'm more on iOS and to create a perfect simulation of update from the app store is kind of tricky but i will try. – user2434385 Jul 17 '18 at 14:51
Everything inside the sandbox will stay. Only the app binary and resources will be replaced. But e.g. the documents, cache, or preferences will stay.
- 6,543
- 7
- 41
- 75
-
So what does it mean for firebase ? I bet there is cache or something like that to store the user session ? – user2434385 Jul 17 '18 at 12:02
-
Yes, there is a local cache except transactions in flight. So when you update the app, basically nothing happens to local firebase data. I have quite complex app on firebase, with users, etc., and also confirm that what Lukas says is most probable behavior. – Cynichniy Bandera Jul 17 '18 at 14:09