Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iCloud Key Value Storage Changes Not Called (NSUbiquitousKeyValueStoreDidChangeExternallyNotification)

NSUbiquitousKeyValueStoreDidChangeExternallyNotification Does not get called at all?

var keyStore: NSUbiquitousKeyValueStore?

viewDidLoad{

NSNotificationCenter.defaultCenter().addObserver(self,
            selector: "ubiquitousKeyValueStoreDidChange:",
            name: NSUbiquitousKeyValueStoreDidChangeExternallyNotification,
            object: keyStore)



userDefinedLabelOne.text = keyStore?.stringForKey("userDefinedStringOne") <---this is changed

 }





func ubiquitousKeyValueStoreDidChange(notification: NSNotification) {

     println("Changed")  <---- Not called


    }

Already checked here iCloud Key-Value-Store Synchronization issues (NSUbiquitousKeyValueStoreDidChangeExternallyNotification not called)

Key value storage selected in iCloud capabilities

CloudKit sharing data ok

The data is saved to the cloud but notifications of changes are not being called

like image 422
JSA986 Avatar asked Nov 09 '22 09:11

JSA986


1 Answers

By signing out of iCloud accounts and back in all started working correctly

like image 105
JSA986 Avatar answered Nov 14 '22 22:11

JSA986



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!