ylliX - Online Advertising Network

WatchConnectivity: Payload could not be delivered

So you are trying to send instant message to parent iPhone app and still receiving “Payload could not be delivered”? This happens only if one of those two thing occured:
1. there is no connection to watch (you should check session.reachable in WCSession)
2. your iPhone app is not responding with didReceiveMessage:replyHandler:

Second one is the most probably so how to fix it? There are 2 “didReceiveMessage” methods in WCSessionDelegate protocol, to make it work, you need to implement second one:

- (void)session:(WCSession *)session didReceiveMessage:(NSDictionary *)message replyHandler:(void(^)(NSDictionary *replyMessage))replyHandler;

so just make it look like:

- (void)session:(WCSession *)session didReceiveMessage:(NSDictionary *)message replyHandler:(void(^)(NSDictionary *replyMessage))replyHandler {
    NSLog(@"iPhone: didReceiveMessage %@", message);
    replyHandler(@{@"command": @"reply"});

You just need to respond with NSDictionary. And it works. Really.

3 thoughts on “WatchConnectivity: Payload could not be delivered

  1. I was using the block-less delegate method, which used to work. Switching to this one in my watch extension fixed my issue. I don’t see anything in the docs that would indicate this is necessary, so thank you!

Leave a Reply