title: Does -[NSObject autoContentAccessingProxy] work at all?
body: <p>I am trying to make use of <code>-[NSObject autoContentAccessingProxy]</code> as described at <a href="http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/nsobject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/autoContentAccessingProxy" rel="noreferrer">http://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/nsobject_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/autoContentAccessingProxy</a>.</p>
  
  <p>The object I am trying to proxy implements the <code>NSDiscardableContent</code> protocol and <code>-autoContentAccessingProxy</code> successfully returns a non-nil value.</p>
  
  <p>If, however, I try to send a message to the proxy, I always get an <code>NSInvalidArgumentException</code> with a reason of "*** -[NSProxy methodSignatureForSelector:] called!".</p>
  
  <p>I understand that if I was writing my own <code>NSProxy</code>-based class, I would have to implement the <code>-methodSignatureForSelector:</code> method, but in this case, I am not writing the proxy, just trying to use the proxy provided by the documented method. For what it's worth, I can see that the proxy is actually of type <code>NSAutoContentAccessingProxy</code>, so I would expect that that class would indeed have an implementation for <code>-methodSignatureForSelector:</code>.</p>
  
  <p>Here is a small block of code using an NSPurgeableData instance instead of my custom class. This small block has exactly the same issue.</p>
  
  <pre><code>NSPurgeableData * data = [NSPurgeableData dataWithBytes:"123" length:3];
  NSLog(@"data.length = %u", data.length);
  id proxyData = [data autoContentAccessingProxy];
  NSLog(@"proxyData.length = %u", [proxyData length]);    //  throws NSInvalidArgumentException!
  [data endContentAccess];
  [data release];
  </code></pre>
  
  <p>Do I have some misunderstanding of the <code>-autoContentAccessingProxy</code> method here, or is it just completely broken?</p>