EddyVerbruggen / nativescript-secure-storage

:closed_lock_with_key: NativeScript plugin for secure local storage of fi. passwords
MIT License
111 stars 26 forks source link

Is there a way to persist data across updates? #38

Open dlcole opened 4 years ago

dlcole commented 4 years ago

It looks like there used to be, at least on iOS. Is it possible on either platform?

hgc2002 commented 4 years ago

Because NS clear all the app folder when a new version is installed, it looks impossible.

hgc2002 commented 4 years ago

Workaround: use external storage. Apparently, it's the right way to do it (and the only one supported everywhere without crossing any safety line). I'm using it right now and it goes well.

spstratis commented 4 years ago

Hi, when you say updates here, were you meaning application updates or Phone OS updates?

dlcole commented 4 years ago

I was referring to application updates.

I don't know that you can depend on external storage being available, especially on iOS.

spstratis commented 4 years ago

I see, so it's confirmed that keychain data for a Nativescript app gets cleared out after application updates? Because I believe I'm seeing similar behavior in one of my applications.

dlcole commented 4 years ago

No, I'm not sure that's confirmed. I had understood that keychain is a way you can preserve data across application updates, and the plugin includes a method to clear data on first run. I never really pursued using this plugin but may investigate it further in the future.

madmas commented 4 years ago

@dlcole the data is persisted during updates. I've used this plugin and the data is not lost during updates. For future usage one should consider #40 and maybe contribute to update to a more future-proof implementation.

UNIcodeX commented 3 years ago

How would one set the save location for nativescript-secure-storage to the "external" area, be it emulated or real??

I'm currently using this library in a project and the data comes back across uninstalls and updates in iOS like I want it to, but is not persisting across Android updates.

Currently there is really no need to save this data across device changes and so persistence would be awesome.

darko-bw commented 2 years ago

Totally agree with @UNIcodeX