Was running into an issue where objects weren't updating when saving to the server. I managed to figure out that Swift doesn't support KVO out of the box: docs(see section Key-Value Observing).
Long story short when using Swift with the cloudmine-ios library make sure to add dynamic in objects that extend CMObject:
class MyClass: CMObject {
// the right way. changes to this property will be picked up by KVO, the object will be marked
// dirty and saved when calling #save() or #saveWithUser()
dynamic var myProperty: String?
// the wrong way. changes will not be picked up by KVO and the object will never be marked
// as dirty and saved correctly
var anotherProperty: String?
}
Was running into an issue where objects weren't updating when saving to the server. I managed to figure out that Swift doesn't support KVO out of the box: docs(see section
Key-Value Observing).Long story short when using Swift with the cloudmine-ios library make sure to add
dynamicin objects that extend CMObject: