我订阅NSUbiquitousKeyValueStoreDidChangeExternallyNotification
来监控来自iCloud的键值变化。收到后,我处理包含的userinfo
并应用我的业务逻辑。
但是,有时候(尤其是首次启动时)我收到的系统相关的密钥,或者至少不属于我的应用程序 -
AppleKeyboards
NSInterfaceStyle
AppleKeyboardsExpanded
AppleICUForce24HourTimeAirPlayShouldShowDebugButtonInPicker
等
这是我订阅通知的方式:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(iCloudStoreChanged:)
name:NSUbiquitousKeyValueStoreDidChangeExternallyNotification
object:store];
答案 0 :(得分:0)