title: display Push notification text in a UIAlert View
body: <p>I am using Parse to deliver push notifications to my app. What i would like is, when the user swipes the notification from the lock screen, or taps it from the home screen, that it opens up the app and displays the text of the Push notification in a UIAlert View.</p>
  
  <p>I imagine that it would slot into the didfinishlaunchingwithoptions method of the app delegate, but i really have not got a clue on how to extract the text of the alert.</p>
  
  <p>Any advice would be greatly appreciated.</p>
  
  <p>So below is my code to display the alert - which is working, but it displays the full JSON message - and when i try to use the objectForKey:@"alert statement to try and extract just the "alert" part of the push notification, nothing is displayed in the message section of the alert.</p>
  
  <pre><code>- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
      [PFPush handlePush:userInfo];
      pushText = [userInfo objectForKey:@"alert"];
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"News", "")
                                                      message:pushText
                                                     delegate:nil
                                            cancelButtonTitle:@"Ok"
                                            otherButtonTitles: nil];
      [alert show];
  
  
  
  
  }
  </code></pre>