---
title: applicationWillEnterForeground()
framework: watchkit
role: symbol
role_heading: Instance Method
path: watchkit/wkapplicationdelegate/applicationwillenterforeground()
---

# applicationWillEnterForeground()

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

## Declaration

```swift
optional func applicationWillEnterForeground()
```

## Discussion

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() method, as the app moves from the inactive to the active state. note: When creating an app that uses the SwiftUI App protocol to manage your life cycle, use the onChange(of:perform:) modifier and the scenePhase environment value to monitor life cycle changes when possible. For more information, see Building a watchOS app.

## See Also

### Monitoring state changes

- [Working with the watchOS app life cycle](watchkit/working-with-the-watchos-app-life-cycle.md)
- [main()](watchkit/wkapplicationdelegate/main().md)
- [applicationDidFinishLaunching()](watchkit/wkapplicationdelegate/applicationdidfinishlaunching().md)
- [applicationDidBecomeActive()](watchkit/wkapplicationdelegate/applicationdidbecomeactive().md)
- [applicationWillResignActive()](watchkit/wkapplicationdelegate/applicationwillresignactive().md)
- [applicationDidEnterBackground()](watchkit/wkapplicationdelegate/applicationdidenterbackground().md)
- [deviceOrientationDidChange()](watchkit/wkapplicationdelegate/deviceorientationdidchange().md)
