Global Variable

NSExtensionHostDidEnterBackgroundNotification

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

Declaration

NSString *const NSExtensionHostDidEnterBackgroundNotification;

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 NSProcessInfo class to request that time.

See Also

Notifications

NSExtensionHostDidBecomeActiveNotification

Posted when the extension’s host app moves from the inactive to the active state.

NSExtensionHostWillResignActiveNotification

Posted when the extension’s host app moves from the active to the inactive state.

NSExtensionHostWillEnterForegroundNotification

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