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

# NSExtensionHostWillResignActive

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

## Declaration

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

## Discussion

Discussion Extensions can use this notification to adjust their activity when they become inactive. For example, you might use this notification to save any unsaved data to prevent it from being lost. 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)
- [NSExtensionHostDidEnterBackground](foundation/nsnotification/name-swift.struct/nsextensionhostdidenterbackground.md)
- [NSExtensionHostWillEnterForeground](foundation/nsnotification/name-swift.struct/nsextensionhostwillenterforeground.md)
