Yes. I actually think that what I am asking is impossible but I'd like to know if you have any idea how to power the iPhone off with swift or objective c code, or at least enter the airplane mode.
Asked
Active
Viewed 288 times
0
-
@MattBall no because i would like to turn it off instead, unless it is impossible – Mar 16 '15 at 14:27
-
The only possibility open to you is to drain the battery really fast, for example by simultaneously doing high performance CPU & GPU operations. Still, it won't be within minutes :) – Sulthan Mar 16 '15 at 14:31
-
@Sulthan the point is that I want to do so without spending any battery – Mar 16 '15 at 14:32
-
1It might be also possible to exploit the system to trigger a restart but turning off the device is impossible on a not-jailbroken device. – Sulthan Mar 16 '15 at 14:33
-
@Sulthan in case it is jailbroken?? Is there any way? – Mar 16 '15 at 14:34
-
@JuanRocamonde iOS is essentially a Unix system. There should be a `shutdown` command somewhere. On a jailbroken device, you can just call exec from the app and execute it. I don't have a jailbroken device myself so I can't check. – Sulthan Mar 16 '15 at 14:40
1 Answers
2
You cannot do this with the Public APIs provided by apple. This may be done using the unreleased Private APIs. But According to Apple's policy, usage of any Private APIs will lead to rejection of App from App Store.

iranjith4
- 378
- 2
- 13