Widget Compte à rebours
Un compte à rebours vers une date qui continue de tourner sur l'appareil entre deux pushs. Ajoutez une date de début et il remplit tout seul une barre de progression.
Cette section décrit une fonctionnalité d'une mise à jour de l'app en attente de validation par l'App Store. Elle se déverrouille ici automatiquement dès que la mise à jour est disponible.
WidgetKit redraws the number itself, so one push sets the target and the widget stays correct for as long as it is pinned — you only send another update when the target moves.
Fields
| Field | Type | Notes |
|---|---|---|
template | string | Required. Must be "countdown" |
end_date | string | Required. RFC 3339 timestamp of the target. Must be after 2000-01-01 and no more than 366 days in the future. A date already in the past counts up instead of down |
start_date | string | RFC 3339 timestamp the countdown started from. Must be strictly before end_date. Adds a progress bar that advances on device |
expired_text | string | Shown in place of the countdown once end_date passes. Max 64 characters. Absent means the widget keeps counting, showing time elapsed since the target |
label, subtitle, icon, accent_color, background_color, text_color | string | Shared content fields — see the API reference |
Example: certificate renewal
{
"content": {
"template": "countdown",
"end_date": "2027-05-10T16:13:00Z",
"start_date": "2027-05-10T13:00:00Z",
"expired_text": "Renewing",
"label": "Cert renewal",
"subtitle": "api.pushward.app",
"icon": "lock.shield.fill",
"accent_color": "indigo"
}
}Dates are bounded on both sides: anything before 2000-01-01 is rejected outright (it catches milliseconds accidentally sent as seconds, which land in 1970), and anything more than 366 days ahead is rejected too. The bounds are re-checked on every PATCH against the merged content, so a widget whose end_date has aged into the past stays patchable.