Sometime, apps may need to prevent the sleeping mode to enhance user experience. For example, an app that play video would not go into sleep while the movie is playing. In IOS, a simple task can be done to prevent the app run into a sleep mode.
Just remember to turn on the sleeping mode whenever the task finish. (for example, when your app stop playing video, you should turn the sleeping mode on again.