Ios 未加载iPhone应用程序时出现Watchkit通信错误
尝试将消息从我的应用程序的watch extension委托发送到配套的iPhone应用程序时,会引发错误(WCErrorCodeDelivery失败) 情况是:Ios 未加载iPhone应用程序时出现Watchkit通信错误,ios,watchkit,Ios,Watchkit,尝试将消息从我的应用程序的watch extension委托发送到配套的iPhone应用程序时,会引发错误(WCErrorCodeDelivery失败) 情况是: 使用模拟器或设备(iOS 10.1 WatchOS 2) iPhone应用程序未加载到内存中(前台和后台均未加载) 在watchextensiondelegateawakeWithContext方法中,会话被激活 在Watch extension delegate将激活方法中,一条消息被发送到iPhone应用程序 if([self
- 使用模拟器或设备(iOS 10.1 WatchOS 2)
- iPhone应用程序未加载到内存中(前台和后台均未加载)
- 在watchextensiondelegate
方法中,会话被激活awakeWithContext
- 在Watch extension delegate
方法中,一条消息被发送到iPhone应用程序将激活
if([self.watchSession isReachable]){
NSDictionary*applicationDict=@{@“请求”:@“状态”};
[self.watchSession sendMessage:ApplicationICT replyHandler:nil errorHandler:nil];
}
这将给出一条错误消息:[WCSession\u onqueue\u notifyOfMessageError:withErrorHandler:]errorHandler:NO with WCErrorCodeDeliveryFailed
因此,此消息将在后台发送iPhone应用程序
有什么想法吗?谢谢您在哪里看到此消息?您没有在调试器窗口(XCode)中指定错误句柄,我将忽略它;为
sendMessage
提供一个错误处理程序,查看是否出现实际错误。我尝试了,但无法显示错误,不确定这是因为没有实际错误。感谢您的帮助您在哪里看到此消息?您没有在调试器窗口(XCode)中指定错误句柄,我将忽略它;为sendMessage
提供一个错误处理程序,查看是否出现实际错误。我尝试了,但无法显示错误,不确定这是因为没有实际错误。谢谢你的帮助