views:

31

answers:

1

For the iPad/iPhone can I detect when the user has the keypad lock turned on for inactivity protection?

If you have sensitive information in an application you will still often cache username/password and it is too disruptive to ask for a full username/password challenge after each period of inactivity.

I want to ensure that if the user has logged in with the username and password (and I cache it for them for convenience), the next time the device is picked up they have to type in their 4 digit passcode to unlock the device.

I'd want to be able to detect if the passcode lock setting is turned off, if it is I could build my own passcode unlocker or require a full username/password/security token authorization after every period of inactivity.

+1  A: 

I don't think it's possible to do this on a device. See the answers to these questions for more information:

http://stackoverflow.com/questions/2547295/can-i-tell-if-the-iphone-has-a-passcode

http://stackoverflow.com/questions/3806455/how-can-i-find-out-if-the-iphone-user-currently-has-a-passcode-set-and-encryption

GregInYEG