title: NSDictionary Category Fails
body: <p>I create a category for NSDictionary and override couple of methods
  1. writeToFile
  2. initWithContentsOfFile.</p>
  
  <p>The WriteToFile function works perfectly and my function gets called. 
  The initWithContentsOfFile fails, it doesnt call my extended function and it returns NULL.</p>
  
  <p>Any pointers/solution/guidance what I am missing or doing wrong?</p>
  
  <p>The same thing works for NSString and I am able to call the similar methods.</p>
  
  <p>Update - My Code</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @interface NSDictionary (TESTDictionary)
  
  -(BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
  -(id)initWithContentsOfFile:(NSString *)path;
  
  @end
  </code></pre>
  
  <p>The implementation </p>
  
  <pre><code> #import "NSDictionary+TESTDictionary.h"
  @implementation NSDictionary (DMPNSDictionary)
  
  -(BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile{
  
      NSData *someData ;
      //
      //I process somedata and convert the NSDictionary to NSData here
      //
      //Write the processed data
      return [someData writeToFile:path atomically:useAuxiliaryFile];
  }
  
  -(id)initWithContentsOfFile:(NSString *)path{
      //Read the file to NSData
      NSData *someData = [read from the file here];
      //convert the NSData to NSDictionary
      self = convertedNSDictionary;
      return self;
  }
  
  @end
  </code></pre>
  
  <p>And I use them in one of the file as</p>
  
  <pre><code>#import "NSDictionary+TESTDictionary.h"
  
  NSDictionary *xmlDictionary;
  //write to file where storepath is in application document directory
  [xmlDictionary writeToFile:storePath atomically:YES];
  </code></pre>
  
  <p>I try reading as follows</p>
  
  <pre><code> NSMutableDictionary *xmlDictionary = [[NSMutableDictionary alloc]initWithContentsOfFile:storePath1];
      NSLog(@"Contents ::%@",xmlDictionary);
  
   NSDictionary *xmlDictionary = [[NSDictionary alloc]initWithContentsOfFile:storePath1];
      NSLog(@"Contents ::%@",xmlDictionary);
  </code></pre>
  
  <p>In both the cases I get Contents as null
  Regards,</p>
  
  <p>Nirav</p>