I filed this bug as FB24738372 back with the iOS 27.0 GM. I noticed it’s still not fixed in iOS 27.1 beta 1, so I thought I’d do a post here instead.

This bug can be especially bad because:

Here’s the SwiftUI code that triggers it on iOS 27, but runs fine on iOS 26:

struct ContentView: View {
	enum TabValue: Hashable {
		case circle
		case square
		case star
		case triangle
		case oval
		case seal
	}
	
	@State var tabValue: TabValue = .circle
	
	var body: some View {
		TabView(selection: $tabValue) {
			Tab("Circle", systemImage: "circle", value: .circle) {
				NavigationStack { Text("Circle") }
			}
			
			Tab("Square", systemImage: "square", value: .square) {
				NavigationStack { Text("Square") }
			}
			
			Tab("Star", systemImage: "star", value: .star) {
				NavigationStack { Text("Star") }
			}
			
			Tab("Triangle", systemImage: "triangle", value: .triangle) {
				NavigationStack { Text("Triangle") }
			}
			
			// MARK: #1
			Tab("Oval", systemImage: "oval", value: .oval) {
				NavigationStack { Text("Oval") }
			}
			
			// MARK: #2
			Tab("Seal", systemImage: "seal", value: .seal) {
				NavigationStack { Text("Seal") }
			}
			
			// MARK: #3
//			TabSection {
//				Tab("Seal", systemImage: "seal", value: TabValue.seal) {
//					NavigationStack { Text("Seal") }
//				}
//			}
		}
		.tabViewStyle(.sidebarAdaptable)
		.defaultAdaptableTabBarPlacement(.tabBar)
	}
}
	
#Preview {
	ContentView()
}

The code above, as is, does not cause a crash.

If you comment out #2 and un-comment #3, the app crashes, because there are 6 items and there is at least 1 section.

From there, if you comment out #1, the crash goes away.

Hope this is a beacon that saves some fellow developers a lot of headaches. Cheers!

  1. I’ll note that a bug-fixing release year actually makes serious bugs like this one more likely, because of all the low-level rewrites. So it’s not really a surprise, depending on how you look at it. ↩