Appears the 3.0 NDA has been lifted, so this should be safe to ask. If this is violating an NDA, please let me know so I can remove the post, post-haste.
I have a very trivial implementation for KVO on an NSOperationQueue. My problem is that when compiling against 2.2.1 SDK, I get different results for the NSOperationQueue in question for a device using 3.0 or one using 2.2.1. I've confirmed this on 1 iPod Touch that has 2.2.1, one that has 3.0, and two sets of iPhones with similar setups.
The code looks like this:
// set observer
[self.myOperationQueue addObserver:self forKeyPath:@"operations" options:NSKeyValueObservingOptionNew context:NULL];
// implementation
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath isEqualToString:@"operations"]) {
NSInteger operationCount = [[(NSOperationQueue*)object operations] count];
NSArray *operations = [(NSOperationQueue*)object operations];
}
}
As per the code above, the device running 3.0 will return the correct operationCount and the correct operations. A device running 2.2.1 will always return nil for operations and 0 for operationCount.
Can't seem to pin point why this is the case. All builds are compiled against 2.2.1.
NOTE
As per Matt's response below; 'object' is nil on 2.2.1. It is not nil on 3.0.