Skip to content
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

LiveView Native Clients: Core localStorage #37

Closed
bcardarella opened this issue Aug 14, 2023 · 4 comments
Closed

LiveView Native Clients: Core localStorage #37

bcardarella opened this issue Aug 14, 2023 · 4 comments

Comments

@bcardarella
Copy link

We may want to have a common storage through Core that is the equivalent of web localStorage. This way we can provide a consistent API on pushing and retrieving values from clients.

localStorage has a limit of 10MB and that seems like a sane limit for us to observe and we should probaby do a FIFO key->value record store where the oldest records are dropped when the limit is reached

@bcardarella
Copy link
Author

Expanding this idea. We should mimic some of the client-side storage options available to the web client. That would include:

  • cookie store
  • localStorage

We are already using a cookie for the websocket (swiftui client) but I suspect we are not storing that cookie for longer-term use. We need to ensure that the Core client is using a cookie, store that cookie on device, include an API for clearing that cookie. On connection the stored cookie is sent with the new connection so that any stored information is brought in for new connections

@simlay
Copy link
Contributor

simlay commented Mar 19, 2024

After some discussion, it seems that implementing local storage in core may not be the best path forward and the clients may need to implement their using Core Data for the SwiftUI client.

@AZholtkevych
Copy link

FYI @carson-katri @nelson-glauber

@bcardarella
Copy link
Author

@AZholtkevych they're aware of this. We're going to look at this feature after v0.3

@AZholtkevych AZholtkevych closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Rejected
Development

No branches or pull requests

3 participants