As I said, it's a property list, so the only validation I get is that it is a well-formed property list. It's the validating the values that I'm stuck on. Is there something better than code like this?
NSObject *name = dict[@"name"];
if (![name isKindOfClass:[NSString class]]) {
// report failure
}
In Swift I would be using the as? operator, and I guess that this is the closest equivalent. (My memory only recalled the isa method, but further searching turned up isKindOfClass.)
Topic:
App & System Services
SubTopic:
General
Tags: