title: How do you show an alert view for push notifications if the app is not in the foreground or background in iOS?
body: <p>I know how to show a push notifications <code>UIAlertView</code> if the app is in the background or foreground using the following code:</p>
  
  <pre><code>(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
  {
      NSString *message = [ [userInfo objectForKey:@"aps"]
                           objectForKey:@"alert"];
      UIAlertView *alert = [ [UIAlertView alloc]
                              initWithTitle:@""
                              message:message
                              delegate:nil
                              cancelButtonTitle:@"OK"
                              otherButtonTitles:nil];
      [alert show];
  }
  </code></pre>
  
  <p>However, I also want to show an alert view if the app was completely closed and the user wants to open the app via the push notifications.</p>
  
  <p>How can I achieve this?</p>
  
  <p>Thanks</p>