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

[Mac Catalyst] Application.Current.OpenWindow not working #10603

Closed
davidbritch opened this issue Oct 11, 2022 · 9 comments
Closed

[Mac Catalyst] Application.Current.OpenWindow not working #10603

davidbritch opened this issue Oct 11, 2022 · 9 comments
Labels
i/great-reporter This issue is opened by an author who is known to open high-quality issues legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)
Milestone

Comments

@davidbritch
Copy link
Contributor

davidbritch commented Oct 11, 2022

Description

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

  1. Run repo project on Mac Catalyst.
  2. 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

@davidbritch davidbritch added the t/bug Something isn't working label Oct 11, 2022
@ghost ghost added the i/great-reporter This issue is opened by an author who is known to open high-quality issues label Oct 11, 2022
@davidbritch
Copy link
Contributor Author

Confirmed that this is no longer an issue once I remembered to add the SceneDelegate/Info.plist config.

@PureWeen PureWeen added this to the Backlog milestone Oct 11, 2022
@ghost
Copy link

ghost commented Oct 11, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@mattleibow
Copy link
Member

mattleibow commented Oct 11, 2022

I was hoping to make this all work by default, but will need to wait for this: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1641233/

@Eilon Eilon added the legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) label Oct 24, 2022
@nor0x
Copy link
Contributor

nor0x commented Dec 22, 2022

any updates on this? Multi-Window doesn't work for me on macOS

@davidbritch
Copy link
Contributor Author

Hi @nor0x

It works on my machine - check out https://github.com/davidbritch/dotnet-maui-issues/tree/main/WindowSizeDemo. You have to add SceneDelegate.cs and configure Info.plist to make it work on Mac Catalyst.

@mattleibow Personally I'd close this issue, or rename it at least.

@nor0x
Copy link
Contributor

nor0x commented Dec 23, 2022

thanks for the reply @davidbritch - turns out it was a typo in my plist file. Everything good now 🥳

@MartyIX
Copy link
Collaborator

MartyIX commented Jan 3, 2023

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.plist file.

@jinxinjuan jinxinjuan added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Jul 11, 2023
@ghost
Copy link

ghost commented Jul 11, 2023

Hi @davidbritch. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jinxinjuan
Copy link
Collaborator

Verified this issue with VS for Mac 17.6.0.1575. Not repro on macOS with sample project. WindowSizeDemo
Screenshot 2023-07-11 at 16 16 50

@ghost ghost closed this as completed Jul 18, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 17, 2023
@Eilon Eilon added the t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) label May 10, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i/great-reporter This issue is opened by an author who is known to open high-quality issues legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) platform/iOS 🍎 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)
Projects
None yet
Development

No branches or pull requests

7 participants