Reply to iOS: List selection is reset to nil when app is sent to background This code works for me .onChange(of: sideBarSelection) { [sideBarSelection] newValue in if newValue == nil { self.sideBarSelection = sideBarSelection } } UI Frameworks SwiftUI May ’23