[Mac Catalyst] Application.Current.OpenWindow not working
See original GitHub issueDescription
Application.Current.OpenWindow(new Window(new MainPage())); works fine on Windows, in .NET 7 RC1, but does nothing on Mac Catalyst. Similarly, Application.Current.CloseWindow(Window); works fine on Windows, but does nothing on Mac Catalyst.
No exceptions. No errors. No new window.
Steps to Reproduce
- Run repo project on Mac Catalyst.
- Click button to open a new window. Nothing happens.
Link to public reproduction project repository
https://github.com/davidbritch/dotnet-maui-issues/tree/main/WindowSizeDemo
Version with bug
.NET 7 RC1.
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
N/A
Did you find any workaround?
No response
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Open a new window in Mac Catalyst - ios
And you're basically done. Run your app, and hit command + N to create as many new windows as you want.
Read more >openWindow | Apple Developer Documentation
openWindow. An window presentation action stored in a view's environment. iOS 16.0+ iPadOS 16.0+ macOS 13.0+ Mac Catalyst 16.0+ visionOS 1.0+ Beta.
Read more >NET MAUI windows
Learn how to use the .NET MAUI Window class to create, configure, show, and manage multi-window apps.
Read more >Exploring Multi-window Apps in .NET MAUI Preview 11
NET MAUI development(on the mac) I've been able to use Visual Studio Mac Preview, in this case I've updated to the latest version...
Read more >Going Desktop with .NET MAUI
NET MAUI uses two of the latest and well-established ways of reaching desktop—WinUI for Windows and Mac Catalyst for macOS.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If anyone hits this issue on Mac Catalyst, then I recommend to read https://learn.microsoft.com/en-gb/dotnet/maui/fundamentals/windows?view=net-maui-7.0#ipados-and-macos-configuration. This issue was very helpful in discovering the root problem.
Plus, https://github.com/davidbritch/dotnet-maui-issues/blob/f8a21f5735c6cafe6266449f83905725de520b70/WindowSizeDemo/WindowSizeDemo/Platforms/MacCatalyst/Info.plist#L29-L45 this is how to add it correctly to your
Info.plistfile.Verified this issue with VS for Mac 17.6.0.1575. Not repro on macOS with sample project. WindowSizeDemo