oblador / react-native-keychain

:key: Keychain Access for React Native
MIT License
3.12k stars 515 forks source link

Replace `SharedPreferences` with `DataStore` Preferences on Android #628

Open ovitrif opened 3 months ago

ovitrif commented 3 months ago

Hi!

I'm working on an implementation to replace the usage of SharedPreferences with DataStore. It's recommended by Google as seen in Prefer Storing Data with Jetpack DataStore, moreover security-wise there may be concerns about SharedPreferences being deprecated in the longer run.

Since DataStore is tailored to Kotlin, I plan to write the code for it in Kotlin, thus adding Kotlin support to the Android library project.

Hope everything about this is ok with the maintainers 🙏🏻

AbhavThakur commented 3 months ago

hi @ovitrif Can you help me out in understanding if this can lead to app crash . I am using React Native - 0.73.6. Here, we are using Kotlin and I have checked my android logcat. Screenshot 2024-03-20 at 4 49 03 PM

ovitrif commented 3 months ago

Hi @AbhavThakur, can you please share the logs part above the screenshot which point to where the error occurred?

Its's this also related somehow to the changes of my PR, #629 ? I mean, unless you're locally using it, it isn't yet available in react-native-keychain