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

# NSExtensionHostWillEnterForeground

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

## Declaration

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

## Discussion

Discussion Extensions can use this notification to restart tasks that it stopped when they moved to the background. The object parameter contains the NSExtensionContext object. This notification does not contain a userInfo dictionary.

## See Also

### Working with notifications

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