-
Notifications
You must be signed in to change notification settings - Fork 135
Open
Labels
🗣 DiscussionThis label identifies an ongoing discussion on a subjectThis label identifies an ongoing discussion on a subject
Description
Introduction
This proposal is for adding support for the Settings
API in Android.
Details
The Settings
object is currently iOS only. It would be valuable to provide an Android interface to SharedPreferences
( similar in intents to NSUserDefaults
, the backing store used on iOS ). Doing so would let developers use the platform appropriate non-secure KV storage object w/o having to involve a separate third party library for Android.
Discussion points
- Is there value in adding this to React Native core? Currently
Settings
exists in core, but it could be inferred based on other portions of core thatSettings
might be eventually migrated to a@react-native-community
project, in which case the effort of adding the code to core would likely be better spent creating a separate module. - Does
SharedPreferences
correctly match the intent ofNSUserDefaults
? - Does the semantics of
Settings
as it stands now correctly map to bothNSUserDefaults
andSharedPreferences
, or isSettings
truly intended as aniOS
only mapping that should not map to Android? - Would promoting
Settings
to both Android andiOS
cause other platforms ( web, Windows, et al ) to feel the need to provide a similar interface, and possibly create an unintentional requirement where a React Native platform must also have a user-local KV storage object? While I suspect each platform may have something that looks similar toNSUserDefaults
andSharedPreferences
, I would also find it believable that the semantics of each are different enough that implying a false uniformity could be dangerous to users.
filiptronicek, safaiyeh, cristianoccazinsp and ludovic-noiraultfiliptronicek
Metadata
Metadata
Assignees
Labels
🗣 DiscussionThis label identifies an ongoing discussion on a subjectThis label identifies an ongoing discussion on a subject