0

I want create alarm app for my apple watch but I don't know how to wake a person. There is an app - Sleep Cycle and they trigger something that looks like on picture:

enter image description here

Watch vibrates constantly like default timer app on apple watch. The question is what's the name of this interface element? This not a notification, not an Alert (https://developer.apple.com/documentation/swiftui/alert), not a WKInterfaceDevice play function. I just want reproduce that behavior. Thanks for help!

Loppik
  • 328
  • 2
  • 8

1 Answers1

2

What you need is notifyUserWithHaptic, it gives a repeating haptic and also displays this notification style screen with Open and Stop buttons if the app isn't active.

As per Apple Docs

For schedulable sessions such as smart alarms, call this method during the session to alert the user. When you call the method, the system plays repeating haptic feedback. If the app isn’t active, the system also displays a system alarm alert on the watch.

Link to Apple Documentation

CodeChimp
  • 4,745
  • 6
  • 45
  • 61