This is currently exactly how the iPhone is designed. I agree with your issue.
My answer was about to be: "Perhaps if you Jailbroke your iPhone you could install some modification software that would prevent someone from shutting it down when locked". However, there's naturally yet another level of indirection.
One of the things that you will never be able to prevent, is the device being put into DFU mode. A phone is put into DFU mode by holding down both the Sleep and Home buttons for 10 seconds, then let go of only the Sleep button (continue holding the Home button) until the phone wakes with it's "connect to iTunes" notice.
DFU mode is one of the few pure hardware modes. After putting a phone into DFU mode, it cannot be used until restored against an instance of iTunes. Which also means that the data will invariably be lost because it will be wiped upon restore of new phone setup.
A few notes:
No computer is completely secure when physical access is allowed by an unauthorized user. No amount of BIOS passwords, login passwords, or anything extended authentication will be unable to be overcome. Physical access is total access.
What I'm saying is that you should spend less of your time attempting to thwart theft, and instead set up a mechanism for safeguarding your data.
Sync regularly, configure your iPhone to wipe itself after 10 failed pin attempts, set up Find My iPhone so you can issue a Remote Wipe command.
Note that I'm not saying not to not bother mitigating theft. Getting a K-Lock if you're in a display position, a secure case so it's harder to lift from your pockets (or don't put it in your pants pocket) are all worthwhile steps to take.
I have written up a procedure for you to try:
- Restore your phone.
- Test - if successful go to last.
- Take your iPhone to the nearest Apple store and tell them what's happening.
- Test the issue with the refurbished iPhone they gave you to replace the one that was malfunctioning - if successful go to last.
- Enjoy your "15 more minutes" feeling.
Failing all of these, your alarm is going off and you're sleeping through it because you stayed up too late playing WoW, drinking, coding, whatever. It eventually stops making noise and leaves the message on the screen. Try placing the phone across the room so you have to get up to turn it off. See if that helps. Either way, now you have a newly refurbished iPhone 4.
Please forgive the snarky nature of this answer. I wrote it after my alarm didn't go off in the morning due to a push notification.
Best Answer
Maybe you can ask the developer of SleepCycle to put some iPod scheduling controls into the app? That seems like the best solution.
I do know of one other solution, but I'm afraid it's a Jailbreak app. There's a paid app in Cydia called
SBSchedule
, which (when combined with the freeSBSettings
andSBSettings iPod toggle
) can toggle the iPod off on a schedule.