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

How to implement offline storage? #360

Open
P99 opened this issue Sep 3, 2021 · 2 comments
Open

How to implement offline storage? #360

P99 opened this issue Sep 3, 2021 · 2 comments

Comments

@P99
Copy link

P99 commented Sep 3, 2021

I am testing the Parse SDK for .NET it is awesome.

I would like to implement a data store similar to the other SDKs so that my application can work seamlessly offline. For instance, the Android SDK has Parse.enableLocalDatastore() ParseObject.pinInBackground() and ParseQuery.fromLocalDatastore()
Can you provide some pointers how to start implementing that?
Maybe it was already done somehow? I could not find any info in the documentation.

Thanks,

@mtrezza
Copy link
Member

mtrezza commented Sep 3, 2021

I could imagine that @cbaker6 may have some design clues, since he has been recently designing the Swift SDK and has probably looked into the pros/cons of the existing designs.

@cbaker6
Copy link

cbaker6 commented Sep 3, 2021

I advise against implementing local storage like the other SDKs. The approach I recommend on taking is protocol based allowing developers to add their own local storage. More information is here: https://github.com/parse-community/Parse-Swift/projects/2#card-53117524

Parse-Swift doesn’t have local storage, but I link to an example implementation that uses Parse-Swift with CoreData (sql-lite) to properly keep data in-sync in on/offline scenarios

Of course, if you want to implement it like the other SDKs, I believe the JS SDK has the latest implementation parse-community/Parse-SDK-JS#612 , fixes after adding LDS, https://github.com/parse-community/Parse-SDK-JS/pulls?q=is%3Apr+is%3Aclosed+LDs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants