Open ejubber opened 1 year ago
Thanks for raising this @ejubber, and for the reproduction. I was able to reproduce the issue, and as you pointed out, it only crashes when the whole thing is hosted in a UINavigationController
, very strange! I have a few things I can try that might overcome the issue, will keep you posted.
Hello, I have the same problem, is there a fix ? Tanks for your help.
For information, problem could be reproductible in preview mode.
Hey @johnpatrickmorgan , I was able to reproduce this on iOS 16.1.1 as well - just a heads up
Find a solution?
Hey @johnpatrickmorgan. I'm having an issue running iOS 15, using the latest version (0.9) of the library, and mixing SwiftUI and UIKit. For reference, our app has some UIKit navigation (via a UINavigationController), and some SwiftUI navigation (via embedded views in UIViewControllers, and using the NavigationBackport library).
I kept getting the error described in the title and couldn't figure out what was wrong. I realized the issue occurs when I have the following structure:
UINavigationController ----UIViewController (root view controller) --------SwiftUIView using NavigationStack (embedded in above ViewController).
When using the popToRoot functionality, I get the error described above each time.
Here's some sample code you can use to reproduce the issue.
If you embed the UIViewController in a UINavigationController, you'll be able to reproduce the issue. I've also attached a ZIP file here for your convenience.
I haven't been able to solve it yet by changing the configuration of the UINavigationController - not sure if there is anything you can change in the source code itself to fix this issue. Let me know if I can provide more info! Thanks
Test3.zip