Is there an API to set a timer in Apple's Clock app to a specific countdown?
I know there is the Reminders SDK and EventKit, but I was looking for setting the timer and not a reminder.
Is there an API to set a timer in Apple's Clock app to a specific countdown?
I know there is the Reminders SDK and EventKit, but I was looking for setting the timer and not a reminder.
No, there is no available API for this. You should create a custom timer inside your app to replicate that functionality.
Use the Timer class of Foundation to make a simple timer in your application.
let timer: Timer!
timer = Timer.scheduledTimer(withTimeInterval: 60, repeats: false) { timer in
[completion code]
}
For more information about creating a timer with a countdown, check out this question.