Debug info when run today extension

南楼画角 提交于 2019-11-29 05:33:17

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.

Link: 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. You need to call completionHandler(NCUpdateResultNoData); right after your widgetPerformUpdateWithCompletionHandler has been called even when the response hasn't been returned.

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

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

b. It terminates widgets that use too much memory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!