Why does this error occur?
In iOS 17+, UIKit's internal toolbar implementation has changed, creating incompatibility between SwiftUI and UIKit. UICoreHostingView is used to host SwiftUI views within UIKit, but sometimes incorrect class references can occur. If you don't need to use a toolbar, here's the solution: First, back up your project, then do the following:
Right-click your Storyboard, select "Open As" -> "Source Code," search with Command+F, and delete or comment out any sections that contain "toolbar."
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: