This bug is still in the Release Candidate. It means when you have a document based #SwiftUI app, you can't use leading items in the navigation bar. They will just disappear every time the app saves the changes in a document. 😔
https://mastodon.social/@sandropennisi/110809303766894687
@sandropennisi I also saw @bdewey having issues with DocumentGroup + NavigationStack. https://iosdev.space/@bdewey/111041862162653396
For what it’s worth, the navigation APIs have been absolutely shocking. Not sure what’s going on over there.
@sandropennisi @bdewey do yourself a favour: stop using these APIs. Seriously.
Write a light wrapper around UINavigationController. It won’t take you long, and I guarantee you’ll have far fewer issues. And if you do, you can actually fix them.
Happy to exchange notes if you’re interested :-)
@sandropennisi AFAIK DocumentGroup is a wrapper around UIDocument + view management, so I’d say it’s still worth exploring your own. 99.99% of my SwiftUI issues are at the UIKit/AppKit border. Apple’s implementations for whatever reason are just extremely problematic.
@phill i guess you’re right. I’ll probably make an example project to test if i can do it. Thanks again for the input
@phill @sandropennisi @bdewey I've had quite a “war” with SwiftUI's NavStack. I think I have something that is working enough, but I may end up going down this route…
Ie, I've made my own Sidebar via an .overlay{}, & just have the NavStack go into a router.