I am parsing some xml, and I update the server pretty frequently with new features. So, when I add a new tag or something, my app, which parses the data crashes when I call because the currentElementValue is not part of my class yet. Is there anyway to check if a class has a property, or should I just catch the exception that gets raised?
[a setValue:currentElementValue forKey:elementName];
Thanks
Very simple:
if (class_getProperty([object class], "propertyName")) {
// it has that property!
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With