I have a non-jailbroken iPhone running iOS 8.
I'd like to automatically have the device never auto-lock / sleep when it is plugged into power, but auto-lock after a set idle interval when not plugged in.
Is there a way to do this without jailbreaking the device?