beeminder / BeeSwift

Official Beeminder for iOS app
Other
29 stars 6 forks source link

Share all UserDefaults with the app group #300

Closed theospears closed 1 year ago

theospears commented 1 year ago

The UserDefaults system has a number of different namespaces. BeeSwift by default has been using one which is not shared with extensions, and done some extra bookkeeping to share particular values with the today widget. This is not sufficient for Intents, and also adds complexity, so instead migrate to storing all settings in a location accessible to all apps in the app group.

To support branch switching and downgrading, at present all values are migrated and double-written to both locations. Once we are confident all users have migrated we can remove this migration code.

This is a prerequisite for #293

Test Plan:

theospears commented 1 year ago

Thanks for the feedback! I'm going to consider it for future PRs and cleanup, but not going to block merging on it for now.