Zephyr icon indicating copy to clipboard operation
Zephyr copied to clipboard

Add ability to set user defaults suite

Open shaundon opened this issue 1 year ago • 1 comments

Hi,

Here's a small PR to add a function for setting which UserDefaults suite to use. I'm using it in my own app to make use of Zephyr while using App Groups.

Example usage:

if let suite = UserDefaults(suiteName: "group.com.example.app-name") {
    Zephyr.setUserDefaultsSuite(to: suite)
}

I'm not sure if you accept external PRs – if this isn't something you're looking for then no worries. I'm also happy to update this PR to document it in the readme, but I figured I'd wait to see what you think before doing that.

shaundon avatar Feb 04 '24 11:02 shaundon

hey, feel free to update the docs and I'll merge this in. Thanks for the contribution!

ArtSabintsev avatar Feb 07 '24 02:02 ArtSabintsev

I'm interested in this update as well!

danielkramer avatar Mar 02 '24 02:03 danielkramer

Sounds good - please update the docs in this PR and I'll happily merge it if you can confirm it works.

ArtSabintsev avatar Mar 04 '24 04:03 ArtSabintsev

Sorry for the delay, I went on holiday right after making the initial PR. I've updated the readme now.

shaundon avatar Mar 17 '24 21:03 shaundon

if you can confirm it works

I'm using it in production in my app SalaryPig and all seems to work well.

shaundon avatar Mar 17 '24 21:03 shaundon

Looks good! Will merge.

ArtSabintsev avatar Mar 21 '24 03:03 ArtSabintsev

Thanks! Just to add, I've been using the update in an app I'm developing.. been using for a few weeks and no issues

danielkramer avatar Mar 21 '24 03:03 danielkramer

Great! I'll push via cocoa pods soon.

ArtSabintsev avatar Mar 21 '24 03:03 ArtSabintsev

Just released as v3.8.0

Closing this issue

ArtSabintsev avatar Mar 21 '24 14:03 ArtSabintsev