I'm trying to use iCloud key-value using NSUbiquitousKeyValueStore class. But when I try to get value by specified key, I get an error
[<NSUbiquitousKeyValueStore 0x6000002983d0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key "some_key"
How can I solve this?
Use:
NSUbiquitousKeyValueStore.default.set(yourValue, forKey: "your.key")
instead of
NSUbiquitousKeyValueStore.default.setValue(yourValue, forKey: "your.key")