Handling UIHostingController Crash on iOS 16.0 – 16.2 in SwiftUI

Encountering a crash in your SwiftUI application when using UIHostingController inside a UINavigationController, specifically when popping from the navigation stack, don’t worry. There’s a workaround to address this issue and prevent the crash. The crash occurs because the UIHostingController and UINavigationController have conflicts during the deallocation process. To resolve this, you can use a different…