So, I'm pretty new to xcode but have some understanding of its basics. For a while now I've been trying to create an method that reboots the phone. I know there are other apps out there that do this already (I've discovered them post trying to do this on my own) however I"m at the point now where I just want to understand how to do it!
I've tried the following with no luck:
reboot(0);
system("reboot");
I understand that you can go into mobile terminal and gain root access then type "reboot" which will successfully reboot the device, but I have no clue how to gain root access within an app to then use the system("reboot"); command. I'm assuming the reason this doesn't work is because from within the app I don't have root privileges.
maxk, thanks for responding but as you'll see in my original post I indicate that I am aware that I need to run it from root. The problem is that I'm not sure how to do that.