Added support for locking the IOS device for a number of seconds.

Removed unused code