How I Built a Spaced-Repetition Widget With SwiftUI and WidgetKit

https://hackernoon.imgix.net/images/LZI31nTt8YbaKMVILwqTxbww9s33-vz837gh.png

A “word of the day” widget is easy to describe: choose a word, render it, update tomorrow.

That was not enough for Slovo, a one-minute Russian learning app, and its central product idea is that a glance can become a recall attempt. If the widget only showed today’s word, it would stop being useful after the learner recognized it. I wanted it to mix new exposure with spaced review.

The final implementation looks simple on the Home Screen. Getting there required decisions about data sharing, timeline generation, rendering modes, fallback behavior, and extension packaging.

Slovo’s medium Home Screen widget exposes a Russian word, meaning, and pronunciation without requiring an app session.

An iOS widget is not a little view running inside the main app. It is a separate extension with its own process and lifecycle. That means the main AppModel cannot hand an in-memory review queue directly to...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE