Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
455 views
in Technique[技术] by (71.8m points)

ios - Debug info when run today extension

Got this debug info when debug a today extension app

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...