今天运行扩展时的调试信息 [英] Debug info when run today extension

查看:112
本文介绍了今天运行扩展时的调试信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

调试今天的扩展应用时获得此调试信息

Got this debug info when debug a today extension app

主机连接< NSXPCConnection:0x170113560>来自pid 53的连接无效

"host connection < NSXPCConnection: 0x170113560 > connection from pid 53 invalidated"

有谁知道这意味着什么?几乎每次调用widgetPerformUpdateWithCompletionHandler时都会显示。

does anyone know what this means? it shows almost every time when "widgetPerformUpdateWithCompletionHandler" called.

推荐答案

NSXPCConnection API用于执行Xcode客户端和应用程序之间的进程间连接在iPhone上。所以你不必担心这个。

NSXPCConnection API is used to perform interprocess connection between Xcode client and your app on iPhone. So you do not need to worry about this one.

链接:
https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingXPCServices.html

因此,您的小部件终止可能有两个原因。

So there may be 2 reasons that your widget is terminated.


  1. 您需要调用completionHandler(NCUpdateResultNoData);即使没有返回响应,也会在调用widgetPerformUpdateWithCompletionHandler后立即调用。

  1. You need to call completionHandler(NCUpdateResultNoData); right after your widgetPerformUpdateWithCompletionHandler has been called even when the response hasn't been returned.

由于应用程序自动终止,您的应用程序将被终止。它终止了小部件/应用程序有两个原因:

Your app is terminated because of the automatic app termination. It terminates the widgets/apps for 2 reasons:




a。它终止未使用的应用程序并允许
回收资源,如内存。

a. It terminates apps that are not being used and allowing the reclamation of resources such as memory.

b。它会终止使用太多内存的小部件。

b. It terminates widgets that use too much memory.

这篇关于今天运行扩展时的调试信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆