Start a new topic

Swift and redundant conformance

Hello,


I'm new to iOS and Swift and I'm trying to query my Kinvey store.


I have followed the documentation :

class Event: NSObject, KCSPersistable {

...

}


but XCode tells me "Redundant conformance of 'Event' to 'KCPersistable'".


Am I wrong ?


Thank you


The solution was to use something like : 

override func setValue(value: AnyObject?, forUndefinedKey key: String) {
	if key == "myField" {
		myField = value as? Int
	} else {
		super.setValue(value, forUndefinedKey: key)
	}
}

  

Thanks Damien !

Hi, Damien:


Can you explain why the KCSPersistable error is arising in the first place?


Thanks,


Michael

Is it because you've added a category to NSObject that adheres to KCSPersistable?


Michael

Mp Rogers,


I believe we used to adhere to KCSPersistable, but don't anymore, this was a change around 1.40.1 if I had to guess.


Thanks,

Login or Signup to post a comment