Hi all,
so, in my app Transloader, when the app is terminated, I sync the Mac's "turned off" status to iCloud. This works on Intel Macs and on Apple silicon Macs when the user manually quits the app.
However, on Apple silicon Macs, when the user shuts down or restarts the Mac and the app is terminated that way, the app is terminated right away (doesn't even receive the -applicationWillTerminate: call), so I'm unable to properly sync the status. This still works on Intel Macs, as far as I know.
So, is there any new API to extend the Mac's shutdown a little longer to finish my sync?
Currently, I use -applicationShouldTerminate:, returning NSTerminateLater, and after syncing, calling -replyToApplicationShouldTerminate:YES . Again, this works fine on Intel Macs if the user manually quits, as well as if the Intel Mac shuts down, but on Apple silicon, it only works if the user manually quits - a shutdown results in the app being terminated without even receiving a -applicationWillTerminate: call.
Both NSSupportsSuddenTermination and NSSupportsAutomaticTermination are disabled in the app's Info.plist.
Thank you for any insights,
- Matt