toast
toast

Reputation: 1980

WatchKit, should I be updating UI from ExtensionDelegate?

I'm using WatchConnectivity to transfer data between the phone and watch. Right now I have didReceiveUserInfo implemented in a ExtensionDelegate+WCSessionDelegate.swift file. When I receive data I need to inform my InterfaceController that the watch has received the required data and is ready to go.

Since didReceiveUserInfo is in ExtensionDelegate, how do I let InterfaceController know that its ready to start doing stuff? Or should I be making InterfaceController the WCSessionDelegate? I'm reading a Ray Wenderlich book on WatchOS, and they recommend doing most things like this in extensions of the AppDelegate, or in this case, ExtensionDelegate.

Code examples would be cool, if you can!

Thanks.

Upvotes: 0

Views: 146

Answers (1)

toast
toast

Reputation: 1980

Solved it by adding an Observer of NSNotifications.

Upvotes: 0

Related Questions