How to install f.lux screen dimmer on iPhone or iPad (iOS tutorial)

It's not yet out of beta, but if you - like us - can't stand the way too bright screen on iOS devices at night - you'll be rushing to download f.lux for your iPhone or iPad right away.
So how do you install f.lux on iOS? First, make sure to have the following downloading and/or installed:
2. Download the f.lux beta for iOS from here (free and safe f.lux for iOS download link)
3. Remember your Apple ID username and password.
Once you've installed Xcode, you will sideload the app to your iPhone. It takes a few steps, but the end result should make it worth it. Make sure you allow yourself some time to play around with this if you are sideloading an app for the first time, this will save you some nerves.
The app automatically adjusts the color temperature and you can set it to dim the screen and boost reds so that the bright bluish light of the display does not mess up with your melatonin levels and ability to quickly fall asleep. You can also set the screen to automatically go dimmer after a certain time (or after sunset), and you can play around to see how it works.
source: F.lux