Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] navigation using NSHostingController within macOS app target does not allow for back nav #30

Open
DanBurkhardt opened this issue Oct 5, 2023 · 0 comments

Comments

@DanBurkhardt
Copy link

AppKit applications can embed SwiftUI views, which is very handy for code-sharing between iOS and macOS targets within the same application project.

Unfortunately, this framework does not take this situation into account and implements a WindowGroup using a SwiftUI Scene, which assumes the hosting application is also a SwiftUI application.

As a result, within an AppKit / Cocoa application, we are able to successfully present the ContentView, but any navigation within the ContentView (from the example project) within a macOS app using NSHostingController does have any automatic navigation controls like the back-button, nor any other sort of method of navigating backwards.

I saw another issue opened with a similar question, but the suggestion to just use the framework as a .sheet is not an acceptable answer for a number of reasons, but mainly because it doesn't work for my application's consistent design approach.

I am fairly motivated to make this function properly, so this isn't just a complaint-- I have forked the repo and will attempt to implement support for my use case on a lightest-possible-touch basis.

@aheze will you consider this sort of improvement for review if I issue a PR?

Thanks,
Dan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant