title: NSNotificationCenter Observer Not Receiving Notification
body: <p>I am aware of the standard reasons as to why a notification would not be received:</p>
  
  <ul>
  <li>Deallocating or nullifying the registered object.</li>
  <li>Removing the object as an observer.</li>
  <li>Not registering as an observer.</li>
  <li>Registering for the wrong notification or posting the wrong notification.</li>
  </ul>
  
  <p>I can happily say that I am damn sure that none of these are happening. I suppose the most likely is that the object is at some point being nullified and recreated, but it registers for the notification upon initialisation.</p>
  
  <p>Here is where I register:</p>
  
  <pre><code>/**
   *  initialises an object with a unique file url
   *
   *  @param  url                         the url to set as the file url
   */
  - (id)initWithFileURL:(NSURL *)url
  {
      if (self = [super initWithFileURL:url])
      {
          self.entries                    = [[NSMutableArray alloc] init];
  
          //  we want to be notified when a note has changed
          [[NSNotificationCenter defaultCenter] addObserver:self
                                                   selector:@selector(noteChanged)
                                                       name:@"com.andbeyond.jamesvalaitis.notesChanged"
                                                     object:self];
  
          NSLog(@"Just registered for 'com.andbeyond.jamesvalaitis.notesChanged'");
      }
  
      return self;
  }
  </code></pre>
  
  <p>Here is where I post the notification:</p>
  
  <pre><code>/**
   *  save the note content
   */
  - (void)saveNote
  {
      if (_isChanged)
      {
          //  save to the text view to the note's contents
          self.note.noteContent           = self.noteView.text;
  
          //  post a notification that we changed the notes
          [[NSNotificationCenter defaultCenter] postNotificationName:@"com.andbeyond.jamesvalaitis.notesChanged" object:nil];
  
          NSLog(@"Just posted 'com.andbeyond.jamesvalaitis.notesChanged'");
  
          //  make sure we know it's already saved
          _isChanged                          = NO;
      }
  }
  </code></pre>
  
  <p>This is the method that is not being called:</p>
  
  <pre><code>/**
   *  called when a note has changed
   */
  - (void)noteChanged:(NSNotification *)notification
  {
      NSLog(@"Just received for 'com.andbeyond.jamesvalaitis.notesChanged'");
  
      //  save the notes
      [self saveToURL:self.fileURL forSaveOperation:UIDocumentSaveForOverwriting completionHandler:^(BOOL success)
      {
          if (success)
              NSLog(@"Note updated.");
      }];
  }
  </code></pre>
  
  <p>This is the console clarifying that I both register and post the notification:</p>
  
  <blockquote>
    <p>2012-11-15 13:27:50.958 iCloud Custom[11269:907] Just registered for
    'com.andbeyond.jamesvalaitis.notesChanged'</p>
    
    <p>2012-11-15 13:28:24.184 iCloud Custom[11269:907] Just posted
    'com.andbeyond.jamesvalaitis.notesChanged'</p>
  </blockquote>
  
  <p><a href="https://dl.dropbox.com/u/25868753/iCloud%20Custom.zip" rel="noreferrer">The whole project can be found here.</a></p>