I have a Watch OS 2 application that communicates with the iOS app via WCSession
method sendMessage:replyHandler:errorHandler:
The iOS application reply correctly but time to time I get the error with code 7014
of domain WCErrorDomain
: "Payload could not be delivered"
It happens more often when the iOS application is not foreground.
I do not find any solution of this problem, I hope one of you know a solution to this problem
For anyone having issues on iOS10 beta 6 and GM, and you are using Swift3, the solution is to change the delegate function header in the iOS app to the following:
func session(_ session: WCSession, didReceiveMessage message: [String : Any], replyHandler: @escaping ([String : Any]) -> Void) {
Note the @escaping and the Any instead of the AnyObject type.