Ultimate Catalyst Guide

How does the iOS app lifecycle work on macOS?

The "Taking iPad apps for Mac to the Next Level" talk at WWDC 2019 has a fantastic overview of all the changes. Here is a brief overview:

  • The UIApplication lifecycle is fully supported on macOS
  • The sequence is the same as on macOS
  • State changes, however, do affect the Mac less, as are almost always Foreground + Active on macOS.
  • Apps only enter background during termination and inactive when launching in the background.
  • Your app should still take App Napp into account
  • Background modes are allowed to finish when an app closes. The background tasks continue even though the app is already not visible anymore to the user
  • Apps are not killed when they consume too much memory
  • Background audio is not supported because users expect audio to stop when they quit an app

So, in short, your app is always in Foreground + Active except when it is (mostly) launching or terminating.