I'm having problems updating the watch after hiding the app and then showing it again.
Steps to reproduce:
Open the Apple Watch app and keep it active (rotating the crown seems to do this well). One handed, open up safari's remote debug and update the main page a few times:
applewatch.loadAppMain({ label: { value: 'a' } });
applewatch.loadAppMain({ label: { value: 'b' } });
...
That should work. But if you deactivate the app by pressing the crown, open it again, and try the same thing it has no effect.
Stepping through the code, mmwormhole didn't have any listeners. I think ParentInterfaceController.m#didDeactivate is removing them and they're never re-attached.
I'm not a native dev so maybe I'm off, but I think that's the issue :)
So re-attaching on willActivate fixes the issue, but I'm not sure if that's the proper place to put it and whether the same handler ends up attached twice in the lifecycle:
I'm having problems updating the watch after hiding the app and then showing it again.
Steps to reproduce:
Open the Apple Watch app and keep it active (rotating the crown seems to do this well). One handed, open up safari's remote debug and update the main page a few times: applewatch.loadAppMain({ label: { value: 'a' } }); applewatch.loadAppMain({ label: { value: 'b' } }); ...
That should work. But if you deactivate the app by pressing the crown, open it again, and try the same thing it has no effect.
Stepping through the code, mmwormhole didn't have any listeners. I think ParentInterfaceController.m#didDeactivate is removing them and they're never re-attached.
I'm not a native dev so maybe I'm off, but I think that's the issue :)