Start a new topic

Swift and redundant conformance


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

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.


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


Hi, Damien:

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



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 !

Thanks Damien !


We are still having difficulty recreating the issue at this time.  I have the iOS engineer in the Boston office for the week so I'm going to have him walk me through the project today or tomorrow if at all possible and see if he can explain what might be happening to you.



Could you tell me if someone has been able to reproduce the issue ?


Thanks for the explaination. The error seems to occur in the Json to object mapping, but in the Kinvey SDK.


NSNull is not the same as nil. The NSNull class defines a singleton object used to represent null values in
collection objects (which don’t allow nil values). Please check following and let me know if it helps you:



Thanks Damien !

Thanks Fabreax, 

I will pass this off now for review.

Enjoy your afternoon

I have sent by email a simple project which includes the issue


Can you provide a more complete set of source code to reproduce via email?  We're working on this, but can't seem to make it fail in the way that you have here.


1 person likes this

I suppose that the mapping of null integers is not possible in the iOS version.

The issue has been already encountered on Android :

I'm looking for a similar workaround in swift.

The error is raised when the value in the DB is "null" (not empty). If the field is an integer, the error is also raised if the value is empty in the db.

Login or Signup to post a comment