<!--
{
  "availability" : [
    "iOS: 8.2.0 -",
    "iPadOS: 8.2.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSNotification/Name-swift.struct/NSExtensionHostWillResignActive",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSExtensionHostWillResignActiveNotification"
  },
  "title" : "NSExtensionHostWillResignActive"
}
-->

# NSExtensionHostWillResignActive

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

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

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)