I'm using EVNetworkningObject of EVReflection library to serialize or deserialize json response from web service. It means I can't change the property name "description" as "description_" or something like that. At the same time, backend will not change their response property for me. How possibly can I fix this error?
The error message says
Getter for 'description' with Objective-C selector 'description' conflicts with getter for 'description' from superclass 'NSObject' with the same Objective-C selector
description is a property of the protocol named NSObjectProtocol of NSObject.
public var description: String { get }
So you can't initiate any variable with the same name in any NSObject subclasses.
For more please visit https://developer.apple.com/documentation/objectivec/nsobjectprotocol/1418746-description.
Please try either by initiating the variable with different names or by implementing with Codable protocol of what @vadian suggested in comments.
The by far easiest work-around with be to rename the property. Ex: var announcementDescription : String?
I assume you are using JSON decodable for getting JSON data. if so , You don't need to make your super class of type NSObject. The reason you are getting this error is because the name conflicts with getter for 'description' from superclass 'NSObject'. So make EVNetworking(which is your super class) object a class which conforms to only decodable protocol and not a class of type NSObject.