I had a single view application wrapped in a NavigationView where I populate data fetched from an API. However, I needed to add a profile section with a TabView and sometimes when I run the application, right when the launch screen is displayed, I get the following error (about once every three times I run/ debug the app) and the app crashes.
AttributeGraph precondition failure: invalid value type for attribute: 56028 (expected PlatformItemList, saw BridgedTableViewState)
The view that causes the error:
TabView {
NavigationView {
MainView()
}
.tabItem { VStack {
Image(systemName: "list.dash")
Text("main")
}
}
NavigationView {
ProfileView()
}
.tabItem { VStack {
Image(systemName: "person.crop.circle")
Text("profile")
}
}
}
I removed the TabView and the profile view and the app runs without any exceptions consistently, which is why I thought it was an issue with the TabView. I searched for documentation on AttributeGraph, PlatformItemList and BridgedTableViewState but found none.