Via Jason Snell, the f.lux folks have documented the process of getting f.lux onto your iPhone without jailbreaking. The process is legitimate; it uses Xcode and the new provisions in the Apple developer program. It’s a bit complicated, so you may just chose to do what I do, and wear cheap sunglasses with yellow lenses.
(For why you would care about any of this, check out Blue light has a dark side at Harvard Health.)