+6
−0
+4
−0
+1
−1
Shared/PlaybackControlIntents.swift
0 → 100644
+99
−0
Shared/WidgetSnapshot.swift
0 → 100644
+88
−0
Loading
Two widgets and one control, in a new SkingomzWidgets extension built and
embedded for iOS only.
"En cours" — small, and circular or rectangular on the Lock Screen —
shows the episode in the player, or the one listened to last, with a
button that resumes or pauses it without opening the app. "À suivre" —
medium — adds the next episodes of the queue, each one tap from playing.
The control toggles playback from Control Center, the Lock Screen or the
Action button.
The extension has no access to the library, so the app hands it a
snapshot through an App Group: WidgetPublisher writes what is playing,
the next three of the queue and thumbnails of their artwork, then asks
the system to redraw. It publishes when the episode, the playing state,
the speed or the queue changes — not the position: while playing, the
progress bar runs on a timer interval computed from the last snapshot
and the speed, so the widgets are not reloaded every second. A last
snapshot is written when the app is terminated, or the widgets would go
on showing a pause button over a bar filling on its own.
The buttons are App Intents. A widget button is built from the intent's
type, so the intents it needs move to Shared/, compiled into both
targets — but AudioPlaybackIntents always run in the app's process, so
they depend on a PlaybackActions protocol the extension can see and only
AppServices implements.
Project: the version and build number move to the project level, one
place for the app and its extension, which the App Store requires to be
identical. The app gets an iOS entitlements file for the App Group.
Releasing needs the new identifier eu.cythin.skingomz.widgets and the
group group.eu.cythin.skingomz registered with Apple first.
Verified on an iOS 27 simulator with a real enclosure: both widgets in
the gallery and on the Home Screen; play, pause and an up-next row from
the Home Screen with the app terminated, the intents running in the app
process; the control toggling both ways from Control Center; macOS
builds without the extension. Not seen: the two Lock Screen families,
and the snapshot written at termination — simctl kills the process
without the notification.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>