Skip to content

Adding initWithSuiteName support for UserDefaults. #7

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

henrylilei
Copy link

Thanks!

@henrylilei
Copy link
Author

@dsibiski any feedback? Thanks!

@dsibiski
Copy link
Owner

dsibiski commented Aug 7, 2015

@henrylilei I was actually testing this out last night. It was working well until I tried to use the bundle identifier to get back to standardUserDefaults.

Using the bundle identifier actually wasn't allowing me to save anything.

Also, it seems that since this is only an instance and not a singleton, do you set the suite name every time you need to use it? How have you been using it?

Remove the false claim about being able to go back to standardUserDefaults.
@henrylilei
Copy link
Author

@dsibiski You are correct, I just tested it and it won't allow you to go back to standardUserDefaults. I had removed the false claim. If you think the going back to standard scenario is important, I can add a new method to provide standardUserDefaults access.

My iOS app is using multiple user defaults to separate the internal data logic, thus we have different underlying plist file names. Every time we need to fetch some data from these plists, we set the corresponding file name and grab the values from it.

@reallistic
Copy link

Is it possible to get this merged and added as a new version in npm?

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

Successfully merging this pull request may close these issues.

3 participants