I want to send data from iWatch to iPhone if my watch is in the background and iPhone app is in the foreground. I transferring data by timer method. It is calling each second. WCSessionDelegate
methods implemented both files iPhone app file and watch kit extension file. WCSessionDelegate
method didReceiveUserInfo
, didReceiveMessage
, didReceiveMessage
replyHandler implemented.
let applicationData = ["class":"progress", "mode":"steps"]
WCSession.default.transferUserInfo(applicationData as [String : AnyObject])