I'm on XCode 11.1 on latest Catalina and none of my app's quit events are being called. applicationShouldTerminate in the AppDelegate nor do I get NSApplicationWillTerminateNotification if I observe it from anywhere. This is from the default quit behavior (Using the menu quit command, Command-Q, or closing the window with applicationShouldTerminateAfterLastWindowClosed returning YES) from the XCode app template using the default storyboard.
This happens with a brand new Xcode project template (If I start a new macOS "App" template, then add the applicationShouldTerminate method to the app delegate).
Other delegate methods like applicationShouldTerminateAfterLastWindowClosed are being called.
Am I doing something horribly wrong or is something messed up with Catalina?
Well, I figured it out and it's because it seems that NSSupportsSuddenTermination
is on by default now.
To disable sudden termination, set this boolean property to NO
in the app's information property list file Info.plist
:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With