<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISceneDelegate/sceneWillEnterForeground(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UISceneDelegate(im)sceneWillEnterForeground:"
  },
  "title" : "sceneWillEnterForeground(_:)"
}
-->

# sceneWillEnterForeground(_:)

Tells the delegate that the scene is about to begin running in the foreground and become visible to the user.

```
optional func sceneWillEnterForeground(_ scene: UIScene)
```

## Parameters

`scene`

The scene that is about to enter the foreground.

## Discussion

To use this method, you must implement the [`UISceneDelegate`](/documentation/UIKit/UISceneDelegate) protocol and configure scenes for your app (see [Specifying the scenes your app supports](/documentation/UIKit/specifying-the-scenes-your-app-supports)).

UIKit calls this method before moving a scene to the foreground. This transition occurs both for newly created and connected scenes, as well as for scenes that were running in the background and were brought to the foreground by the system or a user action. A scene enters the foreground as a precursor to becoming visible onscreen, so this method is invariably followed by a call to the [`sceneDidBecomeActive(_:)`](/documentation/UIKit/UISceneDelegate/sceneDidBecomeActive(_:)) method.

In addition to calling this method, UIKit posts a [`didActivateNotification`](/documentation/UIKit/UIScene/didActivateNotification) and a [`willEnterForegroundNotification`](/documentation/UIKit/UIScene/willEnterForegroundNotification).

For more information on what to do when your app is about to enter the foreground, see [Preparing your UI to run in the foreground](/documentation/UIKit/preparing-your-ui-to-run-in-the-foreground).

> Note:
> When you implement this method and enable scenes, UIKit calls this method but does not call the ``doc://com.apple.uikit/documentation/UIKit/UIApplicationDelegate/applicationWillEnterForeground(_:)`` method on ``doc://com.apple.uikit/documentation/UIKit/UIApplicationDelegate``.

---

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)