Reply to iOS 18 .onChange(of: scenePhase) is constantly triggered For me, the onChange does not even work for some reasons. I managed to resolve it following this answer: https://stackoverflow.com/a/72177271 UI Frameworks SwiftUI Jan ’25