I'm making an alarm app. There are two things that work on the simulator but not on my device.

1) According to [this](http://oleb.net/blog/2014/02/alarm-clock-apps-ios/) website, if UIApplicationExitsOnSuspend is set to "YES", then the app should always be running even if the device is locked (provided that it's in foreground). I used this information to make sure that NSTimer runs even if device is locked. On the simulator, no matter how much time passes by (even like 10+ hours) the NSTimer always works and the sound always fires (even if I lock the simulator screen). When I connect my iPhone device to the computer and run the app through xcode it works well too. But the problem is that as soon as I disconnect my phone and load the saved app, sometimes the NSTimer works and sometimes it doesn't.

2) Local Notifications: On the simulator the local notifications work well but on the iPhone device the notifications are fired at random times and sometimes they don't even fire. But on the simulator the local notifications fire accurately. I tested in different ways (such as setting local notification to fire 20 seconds after app loads and then exiting the app to be in background mode) but it doesn't fire on the specified time and like I said it sometimes doesn't even fire.

In such case, should I trust simulator or the iPhone device? Could this be a bug or is it something I'm doing wrong?