본문으로 건너뛰기

카운트다운 템플릿

서버가 수명 주기를 관리하는 타이머: 시작 푸시 한 번만 보내면 경고와 완료 업데이트는 서버가 알아서 보냅니다.

실시간 현황 시연

Fields

FieldTypeDescription
templatestringRequired. Must be "countdown"
progressfloatRequired. Initial progress (usually 0.0)
durationstringRequired (or end_date). Server-side convenience — converted to end_date before reaching the device. Accepts: "30s", "5m", "1h30m", or plain seconds ("1500")
end_dateintegerRequired (or duration). Unix timestamp when the countdown expires
start_dateintegerUnix timestamp when the countdown began. Must be less than end_date. Used to compute progress on-device.
warning_thresholdintegerSeconds before end_date to send a warning push (accent turns orange)
completion_messagestringText shown when countdown expires (default: "Completed")
statestringStatus text (e.g. "Baking", "Printing")
iconstringSF Symbol name or MDI icon with mdi: prefix (e.g. "mdi:timer-outline")
subtitlestringSecondary text
accent_colorstringNamed color or hex
background_colorstringBackground color override
text_colorstringText color override
alarmbooleanOpt-in: schedule an iOS AlarmKit alarm at end_date that rings through silent mode and Focus, with built-in Dismiss and Snooze. iOS 26+ only. Persists across partial updates until cleared with alarm: null or a transition to ended — see Alarms.
snooze_secondsintegerHow long the alarm's Snooze button defers the alarm, in seconds (60–3600). Defaults to 300 (5 minutes).
앱 버전 1.14.0에서 제공 예정

Accepts url_action, secondary_url_action, and tap_action — tap_action is useful for deep-linking back into the timer's source app while it runs. See Tap actions.

Example Payload

카운트다운 시작
{
  "state": "ongoing",
  "content": {
    "template": "countdown",
    "progress": 0.0,
    "state": "Baking",
    "icon": "flame",
    "subtitle": "25 min timer",
    "duration": "25m",
    "warning_threshold": 60,
    "completion_message": "Done baking!",
    "accent_color": "orange",
    "alarm": true
  }
}

Auto-Managed Lifecycle

After the start push the server manages the remaining lifecycle, in this order; the timer display itself is computed on-device from start_date and end_date, so it counts down in real time without additional pushes.

PhaseTriggerWhat the server sends
StartYour pushNothing -- your update sets ended -> ongoing with the countdown content
Warningwarning_threshold seconds remainAn update with accent_color: "orange", automatically
Completionend_date reachedAn end push with completion_message and progress: 1.0