Is it possible to shutdown an iOS device (iPhone, iPad, iPod) with objective c? I have searched the internet through and through, and nothing at all has come up. I was just thinking about it, how much control over the device you really have. Does anyone know if this is possible? If so, how?
Asked
Active
Viewed 1,623 times
2
-
I doubt it considering Apple barely lets you get access to the device in the first place. – Jesus Ramos Sep 27 '11 at 02:51
-
2That would never make it through the approval process.. – Thilo Sep 27 '11 at 02:52
-
This would definitely not be possible in an app store app - are you talking about a jailbroken device? – Luke Sep 27 '11 at 02:52
-
Apple even discourages from from shutting down _your own app_. Only the user is supposed to decide when to shut things down. – morningstar Sep 27 '11 at 06:48
2 Answers
5
No, it's not possible in a non-"jailbroken" state. Your app cannot escape it's own "sandbox" and consequently has no access to system calls that could be used to control the power state of the device.
Not only that, but App Store approval chances for this feature would be slim to none.

esqew
- 42,425
- 27
- 92
- 132
-
It isn't possible to write an app that does this for your own device? I seriously wish to write some kind of app that can set a timer for when to shutdown my iPod. It's a true drag if I fall asleep with the music running all night in my speakers, draining the battery. – Zolomon Mar 11 '12 at 23:56
0
No, this is not possible on a non-jailbroken device. The operating system maintains control over most of the system-wide functions and access to many things, like power, are prohibited.

Matthew Gillingham
- 3,429
- 1
- 22
- 26