-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[shared_preferences] Allow to specify the suiteName for NSUserDefaults #2861
Conversation
|
@stuartmorgan Sorry for the mention but I saw you recently worked on shared_prferences, would it be possible to review this PR ? It hopefully is all good but it's the first time I contribue here so I might have done mistakes. |
|
@blaxou fix the conflicts plz. I need this feature too |
@jimmyrogue I'm waiting for someone to review it and as soon as it is I will resolve the conflicts, but this PR doesn't seem to get enough attention to get reviewed. |
|
@blaxou I didn't see your earlier message, but I'm not a maintainer of the mobile I recommend reading https://github.com/flutter/plugins/blob/master/CONTRIBUTING.md#the-review-process; note in particular that reviews are prioritized by issue priority, so not filling an issue describing this proposal is likely why it hasn't gotten attention. |
|
@stuartmorgan Oh you are right I completely forgot about this part. I just filed an issue on the main repo ! @jimmyrogue I posted the issue on the main repo, feel free to react to it so that it gets review faster ! flutter/flutter#64739 |
|
How would a user be able to set the Am I understanding it correctly that one can't use |
SharedPreferencesStorePlatform.instance = MethodChannelSharedPreferencesStore(suiteName: 'mySuiteName');
await SharedPreferences.getInstance(); // Always now returns the right instance with suite name specifiedI need to migrate the request to null-safety though. Will see when i have time to do so. |
|
hi @gaetschwartz! Do we know the status of this MR and getting it officially merged into Seems like this issue has stagnated since April? |
|
Looks like this PR is missing tests, and seems to be failing some of the existing tests. |
|
Since this is marked as a draft and hasn't been touched in a few months I'm going to close it to clean out our review queue. Please don't hesitate to submit a new PR if you decide to revisit this. Thanks! |
Description
This PR allows to specify a
suiteNamewhen creating getting an instance ofNSUserDefaultsinMethodChannelSharedPreferencesStoreon iOS. This is pretty much needed if the user wants its app extensions to be able to access theNSUserDefaultssaved by Flutter. See Apple documentation.Related Issues
flutter/flutter#64739
Checklist
///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?