title: How to get host's app object from app extension?
body: <p>I have a custom keyboard extension. And I need to know when my keyboard is shown/hidden.
  I read <a href="https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html#//apple_ref/doc/uid/TP40009542-CH5-SW1" rel="nofollow">this</a> article, this block:</p>
  
  <pre><code>- (void)registerForKeyboardNotifications
  {
  
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(keyboardWasShown:)
                                                   name:UIKeyboardWillShowNotification object:nil];
  
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(keyboardWillBeHidden:)
                                                   name:UIKeyboardWillHideNotification object:nil];
  
  }
  
  // Called when the UIKeyboardDidShowNotification is sent.
  - (void)keyboardWasShown:(NSNotification*)aNotification
  {
  
  }
  
  // Called when the UIKeyboardWillHideNotification is sent
  - (void)keyboardWillBeHidden:(NSNotification*)aNotification
  {
  
  
  }
  </code></pre>
  
  <p>But this code implements into app. The <code>addObserver</code> argument <code>self</code> means it. So, how can I get an object from my host app (it could be any app with text field) to pass for register notifications?</p>
  
  <p>Or is three other options to register if keyboard is shown/hidden? </p>
  
  <p>isfirstResponder also from extension - not an option, i suppose.</p>