3

What I am trying to do is setup a local notification. The code is working as expected but what if the phone is switched off?

After reading some article on UILocalNotification when iPhone switched off I need to recreate each local notification had been made so I go through this How to check if iOS device has been rebooted since launch, and How can I detect whether the iphone has been rebooted since last time app started, and still could not reach my target.

What I want to know is: is there an event that would be launched when the iPhone is rebooted ?

Community
  • 1
  • 1
Zakaria Darwish
  • 358
  • 5
  • 22

1 Answers1

3

You misread your sources.

Local notification won't fire when the phone is off (normal it's off). However, if you have a notification at 3pm, reboot your phone at 2pm, then the notification will fire normally.

Tancrede Chazallet
  • 7,035
  • 6
  • 41
  • 62
  • so the **UILocalNotification** will always fire unless the date is expired right ? few!! your really saved me bro !! Thanks :D – Zakaria Darwish Aug 17 '15 at 05:55
  • 1
    That's it, `UILocalNotification` once scheduled, doesn't need to be recreated. However, if the phone is off at the fire time, then the notification will never be fired. – Tancrede Chazallet Aug 17 '15 at 05:57