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

Data persistence in iOS Cordova App after App termination #191

Open
kjsdesigns opened this issue Dec 6, 2016 · 4 comments
Open

Data persistence in iOS Cordova App after App termination #191

kjsdesigns opened this issue Dec 6, 2016 · 4 comments

Comments

@kjsdesigns
Copy link

kjsdesigns commented Dec 6, 2016

Kudos to the Forerunner dev team. Great product.

I have a similar but more specialized use-case to the following older issue:
#120

My use case is as follows:

  1. User installs Cordova based App (iOS only)
  2. User opens the App, logs in
  3. User goes offline
  4. User performs actions while offline, we store the results in forerunner
  5. User logs out
  6. User goes back online
  7. User logs in
  8. Data from forerunner successfully sent to server
  9. User goes offline
  10. User performs actions while offline, we store the results in forerunner
  11. User terminates the app (exits / reboots device)
  12. User opens up the app again
  13. User logs back in
  14. Forerunner data stored in step 10 is gone

Can anyone suggest a solution that that allows data persistence even after the app is terminated?

@Irrelon
Copy link
Owner

Irrelon commented Dec 6, 2016

Hi ya, this is an interesting issue. I am aware that iOS can clear the indexedDB data if it considers the device is running low on space.

I am assuming from your description that you are using the persistence plugin and doing save() and load() when required.

A user on here found that he could use a cordova plugin to LocalForage that stored data in app storage instead of indexeddb and that solved the issue. I cannot remember the localforage plugin name but a google for it should bring it up.

Can you let me know if that helps at all?

Cheers,

Rob

@kjsdesigns
Copy link
Author

Thank you - will follow-up on the localForage side and let you know.

@Irrelon
Copy link
Owner

Irrelon commented Dec 23, 2016

Hey, how did it go? Did you manage to get the storage to stay put?

@kjsdesigns
Copy link
Author

Sorry for the delay. No, not yet - though the author of localForge suggested he thought his library should fix the issue. For now the issue with my application is not being prioritized. I will follow-up if we do try localForge in the future.

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

No branches or pull requests

2 participants