---
title: "applicationWillEnterForeground(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiapplicationdelegate/applicationwillenterforeground(_:)"
---

# applicationWillEnterForeground(_:)

Tells the delegate that the app is about to enter the foreground.

## Declaration

```swift
optional func applicationWillEnterForeground(_ application: UIApplication)
```

## Parameters

- `application`: Your singleton app object.

## Mentioned in

Transitioning to the UIKit scene-based life cycle

## Discussion

Discussion important: If you’re using scenes (see Scenes), UIKit will not call this method. Use sceneWillEnterForeground(_:) instead to prepare your app to enter the foreground. UIKit posts a willEnterForegroundNotification regardless of whether your app uses Scenes. In iOS 4.0 and later, UIKit calls this method as part of the transition from the background to the active state. You can use 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, which then moves the app from the inactive to the active state. UIKit also posts a willEnterForegroundNotification shortly before calling this method to give interested objects a chance to respond to the transition.

## See Also

### Responding to app life-cycle events

- [applicationDidBecomeActive(_:)](uikit/uiapplicationdelegate/applicationdidbecomeactive(_:).md)
- [applicationWillResignActive(_:)](uikit/uiapplicationdelegate/applicationwillresignactive(_:).md)
- [applicationDidEnterBackground(_:)](uikit/uiapplicationdelegate/applicationdidenterbackground(_:).md)
- [applicationWillTerminate(_:)](uikit/uiapplicationdelegate/applicationwillterminate(_:).md)
- [didBecomeActiveNotification](uikit/uiapplication/didbecomeactivenotification.md)
- [didEnterBackgroundNotification](uikit/uiapplication/didenterbackgroundnotification.md)
- [willEnterForegroundNotification](uikit/uiapplication/willenterforegroundnotification.md)
- [willResignActiveNotification](uikit/uiapplication/willresignactivenotification.md)
- [willTerminateNotification](uikit/uiapplication/willterminatenotification.md)
