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

# applicationWillEnterForeground()

Tells the delegate that the app is about to transition from the background to the foreground.

```
optional func applicationWillEnterForeground()
```

## Discussion

The system calls this method when the app transitions from the background to the foreground. Override this method to undo many of the changes you made to your app upon entering the background. The call to this method is invariably followed by a call to the [`applicationDidBecomeActive()`](/documentation/WatchKit/WKExtensionDelegate/applicationDidBecomeActive()) method, as the app moves from the inactive to the active state.

> 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)