Lock screen for iPhone real device without a certain time of seconds


I want to automate the case of locking my screen of the real device and open the screen again from an APNS - like answer a call from APNS.
Therefore I would like to just lock the screen without a certain amount of time, so that I can unlock it by swiping on the push notification.
I know there is in AppiumDriver the lockScreen(int seconds) but I would just need the lockScreen(). Any idea how I could do that, to implement it on my own?

Thanks a lot