Reputation: 16327
I had used the following code to prevent the iPhone from entering the sleep mode.
[UIApplication sharedApplication].idleTimerDisabled=YES
But is it possible to put the iphone in Sleep mode programmatically?
Upvotes: 0
Views: 1633
Reputation: 46703
No sir, we just can't do it cap'n... we don't... have.. the power.
That's just another thing Apple doesn't want us tinkering with.
Upvotes: 0
Reputation: 20236
No it's not. That is up to the user to decide to do, or not, or when the idle timer is is hit.
Remember, Apple is a consumer-oriented company, where the products are consumer oriented. Developers are more "engineers" than consumers. Yes we consume to, but in different ways. Can you imagine the look on a normal users face if the phone mysteriously shuts off while they're using it? Even if they did tap a button to do it in your app, for instance. It's still non-uniform, and uniformity has been Apple's bread and butter for years.
Upvotes: 1