Notification when iCloud Drive state changes

Is there any way to get notified in macOS when the iCloud Drive becomes online/offline so that I can update the UI in my app to reflect that state?

Thanks!

Answered by Engineer in 890821022

No — there's no notification for iCloud Drive going online/offline. The only iCloud availability signal is account state, not connectivity:

  • Foundation: FileManager.ubiquityIdentityToken (nil when signed out or iCloud Drive is disabled), with NSUbiquityIdentityDidChangeNotification posted when that changes.

Relevant docs:

Accepted Answer

No — there's no notification for iCloud Drive going online/offline. The only iCloud availability signal is account state, not connectivity:

  • Foundation: FileManager.ubiquityIdentityToken (nil when signed out or iCloud Drive is disabled), with NSUbiquityIdentityDidChangeNotification posted when that changes.

Relevant docs:

Notification when iCloud Drive state changes
 
 
Q