<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/ScenePhase/background",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10ScenePhaseO10backgroundyA2CmF"
  },
  "title" : "ScenePhase.background"
}
-->

# ScenePhase.background

The scene isn’t currently visible in the UI.

```
case background
```

## Discussion

Do as little as possible in a scene that’s in the `background` phase.
The `background` phase can precede termination, so do any cleanup work
immediately upon entering this state. For example, close any open files
and network connections. However, a scene can also return to the
[`ScenePhase.active`](/documentation/SwiftUI/ScenePhase/active) phase from the background.

Expect an app that enters the `background` phase to terminate.

---

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)