Search code examples
ioswatchkitios8-today-widgetwatchos-2today-extension

WCSession and Today Widget


I've an app with a today extension and a watch app. From the main app WCSession works fine and data is transferred to the watch and received correctly but when I try to send or receive data through the WCSession in the today widget the property paired and watchAppInstalled of the session are set to false so calling transferUserInfo: does nothing and session:didReceiveUserInfo: is never called.

I know I can open the app using openURL and then send the new data but I want to do that without leaving Notification Center. Does anyone know a nice workaround for this problem?


Solution

  • If the watch app is running in the foreground, you should be able to send it a message via a Darwin notification. Take a look at MMWormhole.