<!--
{
  "availability" : [
    "watchOS: 2.0.0 - 9.2.0"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKExtensionDelegate/applicationDidEnterBackground()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WKExtensionDelegate(im)applicationDidEnterBackground"
  },
  "title" : "applicationDidEnterBackground()"
}
-->

# applicationDidEnterBackground()

Tells the delegate that the app has transitioned from the foreground to the background.

```
optional func applicationDidEnterBackground()
```

## Discussion

Override this method to release shared resources, invalidate timers, and store enough app state information to restore your app to its current state if it’s purged from memory. You have only a few seconds to complete these actions and return.

The system typically suspends your app shortly after this method returns; therefore, don’t call any asynchronous methods from your [`applicationDidEnterBackground()`](/documentation/WatchKit/WKExtensionDelegate/applicationDidEnterBackground()) implementation. Asynchronous methods may not be able to complete before the app is suspended.

Additionally, the system may purge suspended apps at any time to make room for other apps. You aren’t notified when an app is purged from memory. The [`applicationDidEnterBackground()`](/documentation/WatchKit/WKExtensionDelegate/applicationDidEnterBackground()) method is your last chance to perform any cleanup before the app terminates.

> Note:
> When creating an app that uses the SwiftUI <doc://com.apple.documentation/documentation/SwiftUI/App> protocol to manage your life cycle, use the <doc://com.apple.documentation/documentation/SwiftUI/View/onChange(of:perform:)> modifier and the <doc://com.apple.documentation/documentation/SwiftUI/EnvironmentValues/scenePhase> environment value to monitor life cycle changes when possible. For more information, see <doc://com.apple.documentation/documentation/watchOS-Apps/building_a_watchos_app>.

---

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)