How to disable turn-off the device while locked

I really appreciate if anyone have a tweak or any application that disable turn-off the iPhone 5 while locked, forcing the owner unlock the device before perform such task.

Such request comes from the need to avoid unwanted people rob your mobile avoiding location services be used.

Any information is quite welcome.
I really appreciate if anyone have a tweak or any application that disable turn-off the iPhone 5 while locked, forcing the owner unlock the device before perform such task.
Turn off the iPhone 5 while locked? Where is that setting? If you mean the iPhone's display, it will still turn off even if it's unlocked.

Such request comes from the need to avoid unwanted people rob your mobile avoiding location services be used.

Any information is quite welcome.
If you've set a passcode, then go into the settings and disable it. It is your device, right? If I'm misunderstanding what you're asking, I apologize.
I think what he's asking is this: "Is there a tweak that will prevent someone from powering off my device without first unlocking it by using the passcode I've set? This way, a thief couldn't power down my phone to disable location services."

Powerguard used to do this but my iPhone 5 on 6.1 shows that it isn't compatible.

PowerGuard - Enter Password Before Turning Off Your iPhone or iPod - YouTube
Another thought: if you have Activator, you could use that to change the behavior of the Sleep Button>Long Hold. That is what most people would use to turn a phone off, so you could just change it to some other action, like Respring, or Turn On/Off Vibration, etc. That way whenever they tried to turn it off your phone would just do something else and stay locked.
Many thanks Massie, that's precisely what I meant.
Another thought: if you have Activator, you could use that to change the behavior of the Sleep Button>Long Hold. That is what most people would use to turn a phone off, so you could just change it to some other action, like Respring, or Turn On/Off Vibration, etc. That way whenever they tried to turn it off your phone would just do something else and stay locked.

That's not a bad idea! Hmmm.... i say... Hmmmmm
Apple should put that in ios 7 ..


Sent from my iPhone 5 from a galaxy far far away (in the USA ) using Tapatalk !

Original thread: https://forums.imore.com/threads/how-to-disable-turn-off-the-device-while-locked.259828/