NSUbiquitousKeyValueStore is unavailable

I am getting this error when using NSUbiquitousKeyValueStore in my watchOS 2 app:

NSUbiquitousKeyValueStore is unavailable


Seems like iCloud Key-value storage does not work on watchOS even thought the docs states that it works.


https://developer.apple.com/library/watchos/documentation/Foundation/Reference/NSUbiquitousKeyValueStore_class/index.html


Does anybody know how to get this working?

Same problem here.


Debug output:

NSUbiquitousKeyValueStore error: Error Domain=NSPOSIXErrorDomain Code=22 "Invalid argument" UserInfo={NSLocalizedDescription=<error: 0x44c85bc> { count = 1, contents =

"XPCErrorDescription" => <string: 0x44c8754> { length = 18, contents = "Connection invalid" }

}}

Same problem here with watchOS 3. Is the API avaliable or not? In the simulator seems to work.

NSUbiquitousKeyValueStore is unavailable
 
 
Q