How can i detect screen unlock events on iPhone? When the user unlocks it, I want to perform an action in my app. I searched on googled but only found code related to object
As far as we know you can't detect screen lock-unlock status by using native code. By using private api there will be chance of detecting screen lock-unlock status. Your app might be rejected if you are using private api of apple. We recommend not to use apple private api.
You can find the answer from below links if you want screen lock-unlock event in jail broken device
Getting state for system wide notifications in iOS and OS X
Lock Unlock events iphone
Detect screen on/off from iOS service