0

Is there a way to capture when the user clicks/presses your glance? This action throws them into the WatchApp. I'd like to intercept this click before going into the main app.

I'm running the glance in the watch simulator.

4thSpace
  • 43,672
  • 97
  • 296
  • 475

1 Answers1

1

Per App Programming Guide for watchOS:

  1. At some time while your glance is active (ideally, as early as possible, since you don't know how long your glance will remain active), call updateUserActivity:userInfo:webpageURL: with whatever cue you want to pass along to your app.
  2. When the user launches your app from the glance, its main interface controller will receive a handleUserActivity: message containing the info you passed in step 1.
rickster
  • 124,678
  • 26
  • 272
  • 326
  • Right but I want to know this has happened before leaving the glance. – 4thSpace Feb 08 '16 at 18:54
  • You can't. The system handles the tap and launches your app without consulting your code. Glances are non-interactive — the only thing the user can do with a glance is tap it to launch the corresponding app. Or, well, glance at it. – rickster Feb 08 '16 at 18:57