In registering for a callback to change with KVO, this works but makes for compiler warnings.
Is this an accident (that it works), or is there some special sauce I am to apply to suppress the warnings? Is there a global singleton '+' NSObject for each class?
[defaults addObserver:[MyClass class] forKeyPath:@"values.SomeValueThatITrack" options:options context:nil];
Then I also have in MyClass.m:
+(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context;
{
usual blah
}
Actual warning string: "Incompatible pointer types sending 'Class' to parameter of type 'NSObject *'
The KVO change is a global preferences related change, and as such can be dealt with by the class itself, rather than any single instance.