<!--
{
  "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/NSExtensionHostDidEnterBackground",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSExtensionHostDidEnterBackgroundNotification"
  },
  "title" : "NSExtensionHostDidEnterBackground"
}
-->

# NSExtensionHostDidEnterBackground

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

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

## 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`](/documentation/Foundation/ProcessInfo) class to request that time.

---

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)