title: UILocalNotification handle when opened via App icon?
body: <p>I'm working with UILocalNotifications for the first time. Mostly working with repeating notifications. Most all makes sense, except one thing.</p>
  
  <p><a href="http://developer.apple.com/library/ios/#documentation/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html" rel="nofollow">Apple Documentation</a> states several cases for handling local notifications when they fire. </p>
  
  <p>First, a case for when the user "taps the notification" when outside of the App:</p>
  
  <blockquote>
    <p>If the notification is an alert and the user taps the action button
    (or, if the device is locked, drags open the action slider), the
    application is launched. In the
    application:didFinishLaunchingWithOptions: method the application
    delegate can obtain the UILocalNotification object from the passed-in
    options dictionary by using the
    UIApplicationLaunchOptionsLocalNotificationKey key. The delegate can
    inspect the properties of the notification and, if the notification
    includes custom data in its userInfo dictionary, it can access that
    data and process it accordingly.</p>
  </blockquote>
  
  <p>It also states a case for what happens when the user is inside the App:</p>
  
  <blockquote>
    <p>If the application is foremost and visible when the system delivers
    the notification, no alert is shown, no icon is badged, and no sound
    is played. However, the application:didReceiveLocalNotification: is
    called if the application delegate implements it. The
    UILocalNotification instance is passed into this method, and the
    delegate can check its properties or access any custom data from the
    userInfo dictionary.</p>
  </blockquote>
  
  <p>In both of those cases the developer can access the uilocalnotification and then decide what to do with it. However, in a third case - when the user, outside of the App, sees and ignores the notification and then later launches the App, no method is called that allows the application to know which notifications have previously fired?</p>
  
  <p>At first I thought that this statement was describing that behavior, but now I am not sure:</p>
  
  <blockquote>
    <p>On the other hand, if the local notification only badges the
    application icon, and the user in response launches the application,
    the application:didFinishLaunchingWithOptions: method is invoked, but
    no UILocalNotification object is included in the options dictionary.</p>
  </blockquote>
  
  <p>How can I handle the third case? How can I know which local notifications have fired? Do I need to iterate through my list and check all their times myself? Is there a better way to accomplish this?</p>