after a lengthy conversation with an Apple Engineer, this is desired behavior on macOS Monterey and newer, so that .accessory and .prohibited apps are more or less killed outright when restarting, logging out of or shutting down the Mac, in order to reduce shutdown times.
Too bad, imho.
Update:
It's a macOS Monterey issue, not an Apple silicon / Intel issue.
Also, I found out it has to do with having set NSApp activationPolicy to .accessory or .prohibited - if those are set, the app is terminated prematurely on shutdown / restart (-applicationWillTerminate: is never called).
If it's .regular, it works like it should.
after a lengthy conversation with an Apple Engineer, this is desired behavior on macOS Monterey and newer, so that .accessory and .prohibited apps are more or less killed outright when restarting, logging out of or shutting down the Mac, in order to reduce shutdown times.
Too bad, imho.
Update:
It's a macOS Monterey issue, not an Apple silicon / Intel issue.
Also, I found out it has to do with having set NSApp activationPolicy to .accessory or .prohibited - if those are set, the app is terminated prematurely on shutdown / restart (-applicationWillTerminate: is never called).
If it's .regular, it works like it should.