أداة العدّ التنازلي
عدّ تنازلي حتى تاريخ محدّد يواصل العمل على الجهاز بين عمليات الدفع. أضف تاريخ بداية وسيملأ شريط تقدّم من تلقاء نفسه.
قادم في إصدار التطبيق 1.6
يصف هذا القسم ميزة في تحديث للتطبيق قيد مراجعة App Store. يُفتح هنا تلقائيًا بمجرد أن يصبح التحديث متاحًا.
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
PATCH /widgets/cert-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.