Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Conversation

kevinwo
Copy link

@kevinwo kevinwo commented Jan 30, 2016

Allow the ability to set a custom NSUserDefaults object instead of using standard defaults (e.g. if an app extension wants to shared defaults using an app group, one might want to initialize an NSUserDefaults object with a custom suite identifier).

@davdroman
Copy link
Owner

I don't think wrapping NSUserDefaults in a BOSettings object is the way to go to achieve this. It'd be far better to implement this in some form of dependency injection (the dependency being an NSUserDefaults object in this case).

This is really worth discussing. Take a look at #32, where we talk about the need for Bohr to be completely persistence storage agnostic. And it's definitely worth considering for #33 as well.

I wonder if we could achieve this without breaking the current build and without the need to create a wrapper around NSUserDefaults. I bet we can.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants