'NSUbiquitousKeyValueStore Unavailable on Watch OS 3.1.3
After unsuccessfully trying to get iCloud document storage to work on the watch Watchkit Extension Cannot Read from iCloud I tried to simply use the keystore. However, in doing so I get:
NSUbiquitousKeyValueStore is unavailable.
This is supposed to be "always available" according to Apple. So if this basic share isn't going to work on the watch, the document stuff certainly isn't.
This is generated by simply using:
let keyStore = NSUbiquitousKeyValueStore()
Work perfectly fine, as do documents, from the iPhone. It also works on the simulator for the watch, but not the actual watch.
To be clear, I don't understand why I cannot use iCloud's keyvalue store on the actual watch. These are supposed to be available as of Watch OS 2.
Solution 1:[1]
I have officially heard back from Apple that this is not a supported feature of Watch OS. This runs contrary to their own documentation which I let them know about. Hopefully others see this response and it can save a ton of time that I wound up wasting.
Solution 2:[2]
I would like to suggest you use iCloud db: make type record "AppSettgins" and write there anything that you need.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | C6Silver |
Solution 2 | Ivan Titkov |