I have implemented UILocalNotifications in two different apps now. One uses Location Services, which means if it gets killed, it (usually) gets restarted (so it's not as big of an issue). However, in another app, I schedule a UILocalNotification based upon time. In this case, I'm having a major problem.
If I schedule a notification, then the app gets killed, pushed out of memory, phone is turned off then on again, I cannot view older notifications "automatically" when opening the app.
Here is the workflow that works (app running in the background):
- Launch app; app schedules notification; close app; app is now running in the background
- Receive local notification; ignore it at first; pull the drop down menu from the top (status bar); touch the notification to launch the app
- Results: The app appropriately displays the information in the notification.
Here is the workflow that does not work (app no longer running in the background):
- Launch app; app schedules notification; close app; app is now running in the background
- Manually kill app (to simulate my situation)
- Still receive local notification; ignore it at first; pull the drop down menu from the top (status bar); touch the notification to launch the app
- Results: The app launches, but the didReceiveLocalNotification method is not called. The user things the app doesn't work.
- Note: I can't even manually force the information, because if they have received more than one notification, I can't tell which one they touched on to know which one to display.
Is there any way to know which notification they touched on when the app is not running in the background (and thus does not run the didReceiveLocalNotification method)?