Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 17727 [details]
Xamarin Project to reproduce the bug and log
I am trying to use WatchConnectivity to send basic messages from the watch to the phone and back (WatchOS3, Target: 10).
I'm getting errors on the watch of the form "Payload could not be delivered." (and sometimes "Timed out").
Parent app is running and reports that WCSession is paired and Application Is Installed.
Ways to reproduce:
Run the attached project. Click "Start" On watch (This will create the session), Run app on parent phone, Then Click "Send" On watch.
I am not sure whether I am doing something wrong, or this is an internal bug.
Basically, I created a delegate to handle messaging:
public class WatchSessionManager : WCSessionDelegate
session = WCSession.DefaultSession;
private WCSession session;
public void start()
session.Delegate = this;
public override void DidReceiveMessage(WCSession session, NSDictionary<NSString, NSObject> message)
Console.WriteLine("Got message " + message.ToString());
public void sendMessage()
Console.WriteLine("Trying to send message...");
if (session.Paired && session.WatchAppInstalled)
session.SendMessage("Hello", (replyMessage) =>
Console.WriteLine("Reply: " + replyMessage.ToString());
}, (NSError obj) =>
Console.WriteLine("Error : " + obj.ToString());
I Call start(), and then sendMessage() and hope to get something back on the DidReceiveMessage function on the phone.
Full application output and Xamarin projects are attached.
I also tested session.Reachable, which returned true, so overall, all three (Paired, WatchAppInstalled, Reachable) are true, but I keep getting those payload error messages. I also tried to send a dictionary instead of the "Hello" string. That didn't work either.
Shay, I am another Xamarin.ios user. I have a WatchConnectivity working pretty reliably, so I don't think this is a bug, although I encountered this earlier in my development. After you call "ActivateSession()", you have to wait for the callback in your WCSessionDelegate "ActivationDidComplete" before you can start sending messages.
If that doesn't work, then take this to the forum and I can try to help you further. I regularly send messages from the watch to the phone and get replies (and phone to watch) so there must just be a small thing missing. I also use the background updates when the watch app is not active. Hope this helps.
Ulrike pointed me to an example project (https://bugzilla.xamarin.com/show_bug.cgi?id=44526) which works. This is probably an implementation bug from my side.
Xamarin folks - please consider updating your online documentation on Parent App Communication. The online docs and examples only refer to WatchOS1 Wormhole-style communication.
Thanks Ulrike for the information, your contribution is very much appreciated.
Shay I relayed your comment to the documentation team so they can take actions. Thanks for the feedback.