-
As per the title - If I'm changing the time on an existing alarm, and keeping the same id, do I need to stop and set it, or just set it? It's just that I keep getting a crash on iPhone (works fine on android) when I try to set an alarm with same id and same time as currently exists |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @ApplySci If you set an alarm keeping the same Can you tell me more about your crash on iOS ? How to reproduce, what version ? Make sure you use |
Beta Was this translation helpful? Give feedback.
I've found a workaround now, which is to call stopAllAlarms before setting any.
I've got quite a convoluted setup for Mac, which might create a situation that is (1) not a real world case and (2) hard to reproduce: I've got a windows pc running Mac Monterey ios on VMWare, and then I'm simulating an iPhone 14 on that.
I've got a few alarms that get set, and sometimes one or two of the times get updated. To keep it simple, I re-set all the alarms when I get a notification that a time has been updated. If a time has changed, then Alarm.set behaves fine. But if the alarm hasn't changed, then it crashes.
But now I'm awaiting stopAllAlarms before setting any, there's no crash.
I may have an act…