Do remote notifications work on macOS when app is closed?

I have a native SwiftUI Mac app which is based off my iOS app and includes Core Data with iCloud sync. As per my understanding, when a user makes a change on one of the devices a remote notification is sent to the others. I have a widget which displays information from Core Data and the remote notification makes the widget update its information on the next timeline refresh without the user having to open the app manually.

My question is, if an app is closed on macOS so it's not even running in the Dock, do remote notifications work? This page says "the delegate receives this message when the application is running and a remote notification arrives for it". Does that mean the app won't receive remote CloudKit notifications when closed on macOS?

I presume you are using the shouldSendContentAvailable property for your iCloud notifications in order to process them within the didReceiveRemoteNotification function.

content-available pushes are throttled both at the server and the macOS level, and whether the notification will be sent from the server right away or be held for an opportune time; and if sent, the decision of whether the app will be launched to received the notification, are under the system's discretion based on various factors like app state, device state, power and network conditions, etc.

You should not assume content-available notifications will be delivered to your app every time at the moment they were sent.

Do remote notifications work on macOS when app is closed?
 
 
Q