Is the New Haptic API Useless?

I was looking forward to watchOS 2 giving us access to haptic feedback. I thought I could use it to get the user's attention but the sense I get is even though I can call playHaptic from my WatchKit extension running on the watch, my code won't run when my watch app is not active. I would think that haptic feedback would be most useful when the user's wrist is NOT raised. However, my app is not active then. So my code that calls playHaptic won't ever run, at least not until the user raises their wrist and looks at my app. That begs the question, why use haptic feedback when the user is already looking at my watch app. I could just as easily display something in the UI to get the user's attention. I would love to be able to use WatchConnectivity, call sendMessage, and have my watch app call playHaptic to get the user's attention, but sendMessage won't wakeup a watch app that is not active. I "worked around" this with watchOS 1 by presenting a local notification but that's slow, the UI is clunky with the Dismiss button and the whole process is unreliable as it's never clearly when/whether iOS will send notifications across to the watch. Sometimes it does and sometimes it doesn't. I was hoping to streamline the whole process and make my watch app more responsive by sending a message from my phone app to my watch app and have my watch app call playHaptic to give haptic feedback to get the user look at my watch app. So am I missing something or is the new haptic API useless?

Replies

If the question is "is pre-release software buggy, unreliable?", I'd suggest yes, that's quite common. If you're trying to file a bug, feel free to use the reporting link below, especially if the topic is critical to your app in the short term. If you're just describing an annoyance, best to wait for later betas, in that case.

I think you are misunderstanding a couple of key concepts:


WatchConnectivity - you cannot send "realtime" messages from your iPhone app to your watch app unless *both* are active, so what you are trying to do would not work; you can't send a message that would make playHaptic work. playHaptic is designed to draw attention to something the user is seeing, or in a session app that can "run in the background"


Notifications - the way this works is understood and well-documented, it isn't random or arbitrary. It is simple really: the watch will NEVER receive a notification if the user is actually using the phone. It is sent to the phone instead...because that is where the user's focus actually is 🙂

you cannot send "realtime" messages from your iPhone app to your watch app unless *both* are active

This is actually not quite correct. The main thing to key off is whether the isReachable property is true for the destination. The WWDC talk covering WatchConnectivity describes the behavior of isReachable and how it differs between the phone and the watch side.