UIApplicationDelegate calls on Mac Catalyst

I'm converting an iOS to macOS using Catalyst. I'm finding that some of the UIApplicationDelegate functions are not getting called on Mac.


application(:didFinishLaunchingWithOptions:) is called on startup

applicationDidEnterBackground() is called when the app is quit


However, nothing is called when the app is hidden or when it is put into the background. I really need to execute some code when those events happen. Anyone know of a solution?

Replies

Mac apps are generally always in the foreground active state when running on Mac. Check out the last portion of:

https://developer.apple.com/wwdc19/235

There are some changes this year, covered in:

https://developer.apple.com/wwdc20/10143