Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac Catalyst app: how to close a window without terminating the app?

I'm developing an app by using Mac Catalyst.

When user has closed the window on Mac version, the app is terminated.

It was possible to change this behavior in Cocoa by using:

applicationShouldTerminateAfterLastWindowClosed

method or by setting NSSupportsAutomaticTermination to NO in plist file.

How can I get the same in a Mac Catalyst app?

like image 252
emreoktem Avatar asked Oct 25 '25 05:10

emreoktem


1 Answers

I've discussed the problem with Apple technical developer support. After a long discussion, they accepted that this is a bug on Apple side. It's escalated to the engineering team.

UPDATE: Apple Engineering team has provided the following information regarding this issue and it worked for me:

We were able to prevent the quitting behavior by adding NSSupportsAutomaticTermination = NO to info.plist

like image 133
emreoktem Avatar answered Oct 26 '25 18:10

emreoktem



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!