Build the best iOS Reading Light app with just one line of code. The iPhone display makes for a great reading light, but we still need an app that displays a white screen and prevents the iPhone from going to the lock screen.
- open Xcode 7
- File > New > Project
- iOS > Application > Single View Application
func application add the following line:
UIApplication.sharedApplication().idleTimerDisabled = true
Select your device in the dropdown next to the play button and press run. The app is now installed on your device.