Is NavigationSplitView on macOS 27 broken?

On macOS 27 Beta 2, a simple NavigationSplitView example exhibits bizarre behaviour when the window is resized. The sidebar seemingly expands and collapses at random as the window is resized. The symptoms can be exacerbated with toolbar items. The sidebar appears to behave correctly when an inspector view is not present.

Copy paste the code below into a new Xcode 27 project and run on macOS 27 and then resize the window:

File -> New -> Project... -> App

import SwiftUI

@main struct MyApp: App {
  var body: some Scene {
    WindowGroup {
      ContentView()
    }
  }
}

struct ContentView: View {
  var body: some View {
    NavigationSplitView {
      Text("Sidebar")
    } detail: {
      Text("Content")
    }
    .inspector(isPresented: .constant(true)) {
      Text("Inspector")
    }
  }
}

Adding .frame or .inspectorColumnWidth to any of the Text views does not appear to fix the issues.

  • macOS: 27.0 Beta (26A5368g)
  • Xcode: 27.0 beta 2 (27A5209h)

Following up to say that this remains broken in macOS 27 beta 3.

  • macOS 27.0 Beta (26A5378j)
  • Xcode 27.0 beta 3 (27A5218g)

Open Xcode, File -> New Project, macOS SwiftUI app and copy paste the code above and then run.

Hello kennyc,

This looks like a potential issue, thank you for reporting it. Can you please file a bug report via Feedback Assistant with this information? This way our engineering teams can investigate this issue, and you'll receive status updates if a fix is required. Please post the FB number to this thread afterwards.

Bug Reporting: How and Why? has tips on creating your bug report.

Cordially,

Richard Yeh  Developer Technical Support

Dear @kennyc,

Are you still seeing this on macOS 27 Golden Gate Beta 4 with Xcode 27 Beta 4?

Thank you,

Richard Yeh  Developer Technical Support

The NavigationSplitView example above is still broken on macOS 27.0 (26A428) but now it causes a crash.

Steps to produce:

  1. Use macOS 27.0 (26A428), Xcode 27.0 (27A266a)
  2. New project, no Build Setting changes. Delete ContentView and replace MyApp.swift with the code snippet above.
  3. Launch the app, do not resize the window.
  4. Drag the sidebar splitter as far to the right (toward Inspector) as possible.
  5. The application will crash.
*** Terminating app due to uncaught exception 'NSGenericException', reason: 'The window has been marked as needing another Update Constraints in Window pass, but it has already had more Update Constraints in Window passes than there are views in the window. 
<SwiftUI.AppKitWindow: 0x10537b5c0> 0x3bc4 (15300) {{405, 312}, {1013, 449}} en'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000019de2e8c0 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000019d88c60c objc_exception_throw + 88
	2   CoreFoundation                      0x000000019de2e7b0 +[NSException exceptionWithName:reason:userInfo:] + 0
	3   AppKit                              0x00000001a2cc3778 -[NSWindow(NSDisplayCycle) _postWindowNeedsUpdateConstraints] + 1716
	4   AppKit                              0x00000001a238f350 -[NSView _informContainerThatSubviewsNeedUpdateConstraints] + 72
	5   AppKit                              0x00000001a238f2cc -[NSView setNeedsUpdateConstraints:] + 452
Is NavigationSplitView on macOS 27 broken?
 
 
Q