https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScreen_Class/index.html#//apple_ref/occ/instp/UIScreen/brightness
That\'s the Ap
You can use this approach http://oleb.net/blog/2014/02/alarm-clock-apps-ios/
Just add a parameter into info.plist. And your app still run when your screen dim, your device locked.
When you debug, your app still run and never dim automatically, you just press lock button to test.
When you run your app without debug, you can see this feature do, like Music app of Apple, the music still play when device go to turn off screen.