Skip to content
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

Using this in extensions #282

Open
crspybits opened this issue May 16, 2021 · 1 comment
Open

Using this in extensions #282

crspybits opened this issue May 16, 2021 · 1 comment

Comments

@crspybits
Copy link

I'd like to be able to save a value into user defaults with this library, and then retrieve the value in a sharing extension, or vice versa. E.g., see https://stackoverflow.com/questions/45607903/sharing-userdefaults-between-extensions

It looks like this isn't supported yet for this library. Any plans? Thanks!!

(I use your package here: https://github.com/crspybits/PersistentValue.git).

@ky1vstar
Copy link

@crspybits this IS supported. DefaultsAdapter has constructor which takes UserDefaults instance. You need to create to create UserDefaults with appropriate app group shared between your main app and app extensions.

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

No branches or pull requests

2 participants