phimage / Prephirences

Prephirences is a Swift library that provides useful protocols and convenience methods to manage application preferences, configurations and app-state. UserDefaults
MIT License
573 stars 35 forks source link

UserDefaults clearAll doesn't work with a custom suite name #25

Open cassianodialpad opened 4 years ago

cassianodialpad commented 4 years ago

In order to share preferences between my app and its extensions, I'm using UserDefaults(suiteName: "someSuiteName") instead UserDefaults.standard.

Because of the custom suite (domain name), the method clearAll from Prephirences doesn't work, as it uses the bundle identifier as the domain name (as implemented here: https://github.com/phimage/Prephirences/blob/5.0.1/Sources/UserDefaults%2BPrephirences.swift#L64).

Could you please provide some support for a custom suiteName?