This post is from the WWDC26 iCloud & CloudKit Q&A.
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!
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), withNSUbiquityIdentityDidChangeNotificationposted when that changes.
Relevant docs:
ubiquityIdentityToken— https://developer.apple.com/documentation/foundation/filemanager/ubiquityidentitytokenNSUbiquityIdentityDidChangeNotification— https://developer.apple.com/documentation/foundation/nsubiquityidentitydidchangenotification