Trying to make an app button

Hey, my question is if i can make an app its can prevent the user to shut down the iphone before its unlock?

hello, since the power button is hardware and os related im not sure if you can prevent it from happening in the background.