-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Installations created every time #180
Comments
Linux and Android don’t have a Keychain. Are you initializing the Swift SDK with a key/ValueStore that you are persisting across launches? If not, there’s no way for the SDK store the previous installations or login. See comment: #98 (comment) |
I made the comments above because you mentioned "Android". If you are using an Apple OS, can you show your code and explain what you are doing? For example, when do you first save your installation? Do you see the same issue when you signup and then save your installation in playgrounds? It seems the installation is behaving correctly there. A proper flow to persist your installation:
Also, did you look through #115 it may provide some insight |
Hey @cbaker6, thank you for your response. Installation is saved by:
And on login:
And linked to user by:
The installation is functioning fine, it's just that every time a user logs in and out, a new installation is created rather than using the previous one. Should I just delete in installation object on logout? |
Yes, you are correct, a new installation is created on the client after logout due to #112.
Yes, if you have a Cloud Code cleanup Installation function, you can use that if needed. If I remember correctly, the server deletes Installations on logout automatically |
Closing for now, feel free to reopen if there are more questions. |
In the Android SDK, the device stores its installation. When
.current
is called again later, the same installation is saved.I am saving
Installation.current?
, however each time the app is reopened a newInstallation
object is saved in the database.Does anyone have any ideas?
The text was updated successfully, but these errors were encountered: