how to identify if an iPhone is locked?.Can i use the api "com.apple.springboard.lockstate"?

Hi,

I have an iwatch app which communicates to my iOS app.

I want to perform some logic based on the device-lock status.

How do i find through an api if the device is locked?can i use "com.apple.springboard.lockstate"

how to identify if an iPhone is locked?.Can i use the api "com.apple.springboard.lockstate"?
 
 
Q