cfischer
cfischer

Reputation: 24912

KVC compliance test

Is there any tool, similar to LLVM's static analyzer, that wil test if an Objective C class is 100% KVC compliant?

Upvotes: 1

Views: 402

Answers (1)

Caleb
Caleb

Reputation: 125007

I doubt there are many classes that are KVC compliant for all possible keys. You need to specify a particular key when you talk about KVC compliance. If you have a list of keys it's pretty easy to test whether your class is KVC compliant for each of them, but you should also specify whether each key represents an attribute, to-one relationship, indexed to-many relationship, or unordered to-many relationship.

That said, the answer to your question as far as I'm aware is: No, there is no tool included with Xcode that tests the degree of KVC-compliance of a class. You could surely write one without too much trouble, though.

Upvotes: 4

Related Questions