We currently have 4 home screen widgets: Picture of the day, On this day, Top read, and Featured article. These widgets (with the exception of Featured Article) rely on using shared Core Data access with the main app to fetch the data presented in them. This dependency with our main app served us at the time, making use of existing work to quickly get widgets shipped. However, shared Core Data access in app extensions is notoriously error prone, and while we've tried to address this issue (like with exclusive locks when accessing that data), we continue to see unexpected behavior/crashes potentially related to this work. See https://phabricator.wikimedia.org/T268677#7168322 for more details.
It would instead be more ideal for widgets to, indepedent of the primary app, fetch data directly from Wikifeeds and keep the data in a shared cache. This fetching model has been implemented and proved out already for the Featured article widget.
The benefits of this new approach:
- We can focus our remaining widget issue resolution on things within our control (the actual logic of the widgets and not Apple's Core Data shared usage issues)
- We can officially deprecate our old style Today widgets (https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Today.html) which are no longer supported or being maintained
- This is also a future path way to supporting user requests for fully independent widgets that can be configured language independent of the main app (https://phabricator.wikimedia.org/T263283)
- This is also an opportunity to implement our remaining technically feasible new home screen style widget, Explore (https://phabricator.wikimedia.org/T259843)
This is the parent task representing the widget debt tasks to move to this new model.