I'm having what seems to be a unique issue. My NSUbiquitousKeyValueStore is simply not working between launches in the simulator. That is, I'm not even talking about iCloud sync or anything like that, I can't get it to pass the simple test below!
var kvs = NSUbiquitousKeyValueStore.defaultStore()
if kvs.synchronize() == true {
println("kvs synchronised")
}
println(kvs.stringForKey("test"))
println(kvs.setString("WORKED", forKey:"test"))
println(kvs.stringForKey("test"))
Everytime I run my iOS 8 app in the simulator, this prints out the same message.
kvs synchronised
nil
WORKED
Yes, iCloud is configured and enabled in the Entitlements. Yes, even "Key Value Store" is checked. Yes, the Simulator account is setup for iCloud syncing.
It seems that even the local backing SQLite DB is getting clobbered between every run? I'm at a loss.
I've read that iCloud does not work at the simulator but it's not official. Nothing is written about it at Apple's documentation.
I'm working at an application where I use simple key/value storage implementation and, for my surprise, it worked once or twice in thousands of tests. It's definitely not reliable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With