Added support for backgrounding the IOS application for a number of seconds.

Removed duplicate code

Added test case

Removed unused code

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

Removed unused code