Tutorial by Examples

iPhone App import WatchConnectivity and conform to WCSessionDelegate. use the static session delegate via WCSession.default(). Send data to Watch app using: WCSession.default().sendMessage(message, replyHandler:_ errorHandler:_) The message object should be a dictionary of type [Stri...
WatchKit App import WatchConnectivity and conform to WCSessionDelegate. use the static session delegate via WCSession.default(). Send data to the iPhone app using: WCSession.default().sendMessage(message, replyHandler:_ errorHandler:_) The message object should be a dictionary of typ...
Sending data to your Watch app from your iPhone or from your iPhone to your Watch App after triggering some event is very simple, though the code can look a little complex at first. let message = ["key":"value-to-send"] WCSession.default().sendMessage(message, replyHandler: {...

Page 1 of 1