I am using this in my appdelegate\'s applicationDidFinishLaunching: method to make sure the iPhone doesn\'t go to sleep during the time the app is open
If your application is using camera then app will go to sleep after using camera . So you need to add UIRequiredDeviceCapabilities in your app plist . Different devices you can add as shown
here