WatchOS2 - didDeactivate() called when the context menu appears?

Did anyone else notice that didDeactivate() is called when the context menu appears?

Is that a simulator bug or as expected? Because if so, then I can't tell the difference between if I closed the controller or if the context menu appeared.


Can someone confirm device behavior? (don't own an Apple Watch)


Thanks in advance

Replies

You can use dealloc (Objective-C) or deinit (Swift).

They are called when a controller is dismissed or popped.

Need to look into deinit but I still find it odd that didDeactivate() is called on context menu.

>still find it odd that didDeactivate() is called on context menu.


Your tvOS app loses focus at that point, so it's by design that dD() is called.

Can anyone confirm whether didDeactivate() gets called when you bring up the context menue on an actual Apple Watch


As per documentation, simulator behaves differently than device


In iOS Simulator, WatchKit calls this method for the current interface controller when you lock the simulator by selecting Hardware > Lock. When you subsequently unlock the simulator, WatchKit calls that interface controller’s

willActivate
method again. You can use this capability to debug your activation and deactivation code.