Contents

NSExtensionHostDidEnterBackground

Posted when the extension’s host app begins running in the background.

Declaration

static let NSExtensionHostDidEnterBackground: NSNotification.Name

Discussion

Extensions can use this notification to stop tasks and prepare the extension to be suspended. The object parameter contains the NSExtensionContext object. This notification does not contain a userInfo dictionary.

Extensions receive only a short amount of time to perform any background work. If you need more time to complete critical tasks, use the methods of the ProcessInfo class to request that time.

See Also

Working with notifications