Tab grayed out, but not disabled

Bug report: FB25495244

This bug also appeared with Xcode 27; it worked previously.

scenario:
A TabView with, for example, 4 tabs.

Data in ContentView is loaded via @Query.
In ContentBindingView, the same thing is done, but using a parameter instead of SwiftData.

ContentView:
If no data is available, the system automatically switches to tab 4 at the start;
while you can click on other tabs, they are disabled, and the system will not switch to them.

ContentBindingView:
When tabDisabled is set to "true", the system automatically switches to Tab 4 upon startup;
while it is possible to click on other tabs, they are disabled, and the system will not switch to them.

So far, so good.

The first three tabs are only active if at least one data record exists or tabDisabled is "false".
Tab 4 is always active and is used for data entry.

When data is entered in Tab 4, tab 1 to 3 should become active.

However, it appears as though tabs 1 through 3 remain disabled—the icons appear grayed out.
That is actually not the case; you can click on the tabs, and as soon as you move
away from a tab, its icon is displayed correctly.

This issue did not exist in Xcode 26.
In Xcode 26, all symbols were displayed correctly from the start, once data had been saved.

What I noticed on the iPhone Duo:
If you open the program on an iPhone Duo while it is closed, enter some data, then move the app
to the background, open the iPhone Duo, and bring the application back to the foreground,
tabs 1 through 3 will be active.

The entire view is being updated, which is why tabs 1 through 3 are now active—though they should have been active already.

A side note:
The same issue described in the forum post "A layout bug when using Tab View in SwiftUI (FB25490881)" also occurs in this program.
The entire view has shifted upward.
The text field is no longer visible—only the Add button remains.
In the other views, you can only see half of the text.

import SwiftUI

struct ContentBindingView: View {
    @State private var tabDisabled: Bool = true
    @State private var selection: TabSelection = .tab1

    private var isTabDisabled: Bool {
        print("ContentView.isTabDisabled: \(tabDisabled)")
        return tabDisabled
    }
    
    var body: some View {
        TabView(selection: $selection) {
            Tab("Tab 1", systemImage: "waveform.badge.magnifyingglass", value: .tab1) {
                Text("tab 1")
            }
            .disabled(isTabDisabled)
            
            Tab("Tab 2", systemImage: "heart", value: .tab2) {
                Text("tab 2")
            }
            .disabled(tabDisabled)
            
            Tab("Tab 3", systemImage: "target", value: .tab3) {
                Text("tab 3")
            }
            .disabled(tabDisabled)
            
            Tab("Tab 4", systemImage: "gear", value: .tab4) {
                AddFriendBindingView(tabDisabled: $tabDisabled)
            }
        }
        .onAppear {
            print("ContentView onAppear disabled: \(tabDisabled)")
            if tabDisabled {
                selection = .tab4
            }
        }
        .onChange(of: selection) {
            print("ContentView onChange disabled: \(tabDisabled)")
        }
    }
}
struct AddFriendBindingView: View {
    @Environment(\.dismiss) private var disdmiss
    @Binding var tabDisabled: Bool
    @State private var name: String = ""
    
    var body: some View {
        VStack {
            TextField("Name", text: $name)
            Button {
                addFriend()
            } label: {
                Text("Add")
            }
            .buttonStyle(.borderedProminent)
        }
        .padding()
        .onAppear {
            print("AddFriendView onAppear disabled: \(tabDisabled)")
        }
    }
    
    private func addFriend() {
        tabDisabled = false
        name = ""
        disdmiss()
    }
}

Christian

I happened to discover that the issue only occurs on the iPhone, iPhone Duo.
On the iPad, tabs 1 through 3 become active immediately.

I have updated the bug report accordingly.