iphone local notification in simulator

Viewed 40139

I just downloaded xcode and trying to make local notification example. The question is if local notification works in simulator?

thank you

4 Answers

To test local notifications in iPhone simulator, follow these steps:

  1. As simulator time is exactly the one in your machine, change the time of your machine to the 1-minute previous of your desired time (when you are expecting your local notification to fire)
  2. Restart simulator(this is awkward, but sometimes it seems iPhone simulator fails to get updated time instantly)
  3. Run the simulator once again(maybe by running your app from xcode, in which case you must press the home button to send your app to background). Once the time is reached you should see the notification

These steps helped me always to get successful local notifications.

Related