---
title: NSExtensionHostDidEnterBackground
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsnotification/name-swift.struct/nsextensionhostdidenterbackground
---

# NSExtensionHostDidEnterBackground

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

## Declaration

```swift
static let NSExtensionHostDidEnterBackground: NSNotification.Name
```

## Discussion

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

- [NSExtensionHostDidBecomeActive](foundation/nsnotification/name-swift.struct/nsextensionhostdidbecomeactive.md)
- [NSExtensionHostWillResignActive](foundation/nsnotification/name-swift.struct/nsextensionhostwillresignactive.md)
- [NSExtensionHostWillEnterForeground](foundation/nsnotification/name-swift.struct/nsextensionhostwillenterforeground.md)
