Skip to content

Widget freshness: best-effort background refresh of today's tile (BGAppRefreshTask) #175

Description

@AtomicTrxn

Split out of #116 (closed). The home-screen widget reads today's puzzle from the shared App Group container (CrosscueWidget.swift), which is only refreshed when the app runs. A user who hasn't opened Crosscue in a day or two sees a stale "today" tile.

Scope

  • Register a BGAppRefreshTask (identifier e.g. dev.tomhess.crosscue.refresh) at launch; reschedule daily from the completion handler.
  • On wake, run attemptIfNeeded() (downloads/imports today's puzzle) and refresh the widget timeline so the App Group snapshot is current.
  • Document the limitation in the QA checklist: iOS controls cadence and may rarely fire it for low-engagement users — this is best-effort, not guaranteed.

Explicitly out of scope

Why this is low priority

Acceptance

  • BGAppRefreshTask registered at launch and rescheduled daily from completion
  • On wake, today's puzzle is fetched (if missing) and the widget timeline reloaded
  • QA checklist notes the best-effort / iOS-throttling caveat
  • No regression to cold-start time or existing Phase 1 on-open behavior

Refs: #116 (origin), #159 (why no push)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions