---
title: ScenePhase.background
framework: swiftui
role: symbol
role_heading: Case
path: swiftui/scenephase/background
---

# ScenePhase.background

The scene isn’t currently visible in the UI.

## Declaration

```swift
case background
```

## Discussion

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 phase from the background. Expect an app that enters the background phase to terminate.

## See Also

### Getting scene phases

- [ScenePhase.active](swiftui/scenephase/active.md)
- [ScenePhase.inactive](swiftui/scenephase/inactive.md)
