ExtensionKit & ExtensionFoundation process lifecycle

An XPC service’s process has a system-managed lifecycle: the process is launched on-demand when another process tries to connect to it, and the system can decide to kill it when system resources are low. XPC services can tell the system when they shouldn’t be killed using xpc_transaction_begin/end.

Do extensions created with ExtensionFoundation and/or ExtensionKit have the same behavior?

Answered by DTS Engineer in 847764022

Not really. Extension are loaded by a host and it’s that host that controls the extension’s lifecycle. The droid you’re looking for here is the AppExtensionProcess type and its invalidate() method.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

Not really. Extension are loaded by a host and it’s that host that controls the extension’s lifecycle. The droid you’re looking for here is the AppExtensionProcess type and its invalidate() method.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

ExtensionKit & ExtensionFoundation process lifecycle
 
 
Q