I am making my app for Apple Watch OS2, in which I use sendMessage:replyHandler for communication b/w iPhone and Watch. Now the problem is that when I send a message to iPhone from my watch and goes to background in watch, I do not receive any replyHandler back to my watch. This is working fine when watch app is in foreground. Any suggestions will be appreciated.
Asked
Active
Viewed 316 times
1 Answers
1
this is expected behaviour.
sendMessage is for fast foreground communication that is important at the moment and thrown away when not deliverable.
Watch apps in the background don't do anything, so it is not deliverable.
if you want to get information to the watch more reliable but not so fast, use transferUserInfo which is queued and works in the background.

Gerd Castan
- 6,275
- 3
- 44
- 89
-
1Thanks. Yes truly said. But Even after I use transferUserInfo or updateApplicationContext, I did not receive delegate callback on my watch when it wakes up. – Amish Nov 16 '15 at 12:32
-
Yes, you don't get a callback. transferUserInfo is your way to queue information that you can receive with the corresponding delegate method. sendMessage is like speaking: if nobody is there to listen, the sounds are lost. transferUserInfo is more like mail. You can read it later. – Gerd Castan Nov 16 '15 at 12:36