reports icon indicating copy to clipboard operation
reports copied to clipboard

FB10566438: Sidebar randomly shows/hides when launching SwiftUI app multiple times

Open insidegui opened this issue 3 years ago • 1 comments

  • Date: 2022-07-06
  • Resolution: Open
  • Area: SwiftUI Framework
  • OS: macOS 13.0
  • Type: Incorrect/Unexpected Behavior
  • Keywords: SwiftUI, macOS

Details

macOS 13 beta - 22A5286j Xcode 14.0 beta 2 (14A5229c)

Description

In a simple app that uses NavigationSplitView to create a sidebar/detail user interface, the sidebar will be randomly hidden/shown between different launches of the app, regardless of whether the user has interacted with the sidebar or the app in general.

This can also be reproduced with NavigationView.

Steps to reproduce:

  • Download the sample project attached to this feedback report
  • Press Command + R to launch the app and check the state of the side bar
  • Press Command + Q to quit the app
  • Press Command + R to launch the app
  • Repeat the process a few times

Expected results:

The state of the side bar should not change randomly between launches of the app.

Actual results:

The side bar is hidden/shown randomly between launches of the app.

Files

https://user-images.githubusercontent.com/67184/177579635-3f805af6-33b4-4594-9cb5-70f79987ffa2.mov

SideBarSwiftUIBug.zip

insidegui avatar Jul 06 '22 14:07 insidegui

Workaround discovered: checking the option to launch he app without state restoration in Xcode’s scheme settings resolves the problem during debugging, so this is likely a bug in the state restoration system.

insidegui avatar Jul 06 '22 14:07 insidegui