
Sideloading f.lux on iOS with Xcode 7 - walterbell
https://justgetflux.com/sideload/
======
blackaspen
I'm so insanely happy to see this, even with it's minor shortcomings. f.lux
has eliminated all eye-stress for me while computering -- it's been one of the
only reasons I've considered jailbreaking my iPhone...until now! Serious
thanks to the developers.

~~~
ryhanson
Completely agree! I started limiting myself to apps that had night mode such
as, Alien Blue and Tweetbot.

Being able to go from a computer with f.lux to my iPhone with f.lux will play
much nicer with my eyes at night. I can literally feel the strain in my eyes
when going from f.lux to no f.lux.

~~~
walterbell
We can only hope that control of blue light emissions will be natively
implemented by all phone and tablet manufacturers, to protect the future
health of billions of humans. Here are some articles about the impact of blue
light on eyes and sleep.

[http://thenextweb.com/lifehacks/2014/04/23/7-things-can-
righ...](http://thenextweb.com/lifehacks/2014/04/23/7-things-can-right-now-
protect-vision/), _" Blue light is able to pass through what is called the
retinohypothalamic tract, or pathway. This pathway is responsible for
regulating our circadian rhythm and a number of other biological and
behavioral processes."_

[http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2831986/](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2831986/),
_" Hastings and Sweeney’s paper, published in the December 1958 Biological
Bulletin, gathered dust for decades. No one thought these findings might hold
any relevance for humans, whose circadian rhythms were then widely believed to
be relatively insensitive to light. But scientific discoveries in the past two
decades have changed all that."_

[https://theconversation.com/a-dark-night-is-good-for-your-
he...](https://theconversation.com/a-dark-night-is-good-for-your-
health-39161), _" In the last decade or two it has become clear that the genes
which control the endogenous circadian rhythm (the “clock genes”) also control
a large part of our entire genome including genes for metabolism (how we
process the food we eat), DNA damage response (how we are protected from toxic
chemicals and radiation), and cell cycle regulation and hormone production
(how our cells and tissues grow)."_

There is room lighting with low-blue content, e.g. the G.E. Align PM bulb,
[http://www.amazon.com/gp/product/B00PLR3M0M](http://www.amazon.com/gp/product/B00PLR3M0M)
& [https://gigaom.com/2014/09/01/what-is-the-blue-light-from-
ou...](https://gigaom.com/2014/09/01/what-is-the-blue-light-from-our-screens-
really-doing-to-our-eyes/), _" It remains unclear whether our screens
themselves will soon emit less blue light — Hansler is pessimistic because he
says that changing the amount of blue light will be like admitting that the
screens are causing health problems, and lawsuits could ensue."_

~~~
TazeTSchnitzel
> Hansler is pessimistic because he says that changing the amount of blue
> light will be like admitting that the screens are causing health problems,
> and lawsuits could ensue.

You don't need to talk of it as a health problem. Just say it makes it kinder
on the eyes.

------
yesimahuman
I'm surprised we haven't seen this emergent behavior for iOS yet. As more and
more people have Xcode and a dev license, we could have a sufficiently large
amount of people to skip the app store for apps that will never be allowed. I
wonder how Apple will like that.

I can see it now: the "Sideload App Store"

~~~
pcwalton
Seems like there's a reasonably good chance that we'll see a tool to automate
this process—an "installer for apps".

I guess Apple would likely respond by one or both of (a) putting up more
roadblocks to getting developer accounts or (b) further restricting what apps
can do at a technical level through more sophisticated sandboxes, making the
delta in allowed functionality between an app in the App Store and a
sideloaded app smaller and smaller.

~~~
0x0
They must have expected this when they changed the latest xcode to allow free
personal provisioning.

There's already some significant annoying limitations, in particular short
provisioning expiration limits (must reinstall the app every 90 days), and no
access to services like push notifications.

~~~
walterbell
Is the app prevented from starting after 90 days?

~~~
JonathonW
Yes, once a provisioning profile expires, apps built against it fail to
launch.

You have to rebuild and reinstall the app (with an updated provisioning
profile, but Xcode takes care of all that behind the scenes now) to get an
expired app working again.

------
philo23
Installed this earlier today, only thing thats worrying me so far is that it
seems to wake up my phone (to the point it asks for the passcode) every now
and then. Not really a fan of that happening all the time as I can see it
draining the battery pretty quick. From what I remember reading through the
GammaThingy source code it has something to do with needing to wake up the
display to change the gamma
([https://github.com/thomasfinch/GammaThingy/blob/2b504461c4f1...](https://github.com/thomasfinch/GammaThingy/blob/2b504461c4f1afad839513384a754398325cc429/GammaTest/mvc/controller/GammaController.m#L238))
but it seems to be doing quite a lot more even once the max temperature has
been reached...

Edit: also probably worth mentioning, unlike GammaThingy the implementation of
f.lux is hidden inside of a compiled nib.

~~~
herf
Author of f.lux here --

This build of f.lux prefers to use notifications (you can turn off the
Notification Center ones).

The screen settings we're changing only work when the screen is _on_ but we
have to be "ready" when you unlock your phone. We're working on a version that
does quite a lot fewer wakeups.

In our jailbreak version, we just hook the screen unlock and do work then, but
we can't do this in the jail because we never wake up.

In this version the notifications serve as a "wakeup". If we fail to show a
notification, we hit the unlock instead.

The battery impact overall is extremely low.

~~~
seesharp
Can I turn off the lock screen notification and banners though? So like this:
[http://imgur.com/CYWeuHz](http://imgur.com/CYWeuHz).

------
newscracker
That's awesome. Having used f.lux on all computers, I wish it would just
somehow get into iOS (without needing a jailbreak).

On a serious note, have you people talked to Apple directly to get this added
either into iOS (possibly the best approach considering how the app store and
app policies are structured)?

Also, how did you get this to work on iOS even with side loading (and no
jailbreak)? It would be interesting to know.

~~~
walterbell
See this thread for discussion and code,
[https://news.ycombinator.com/item?id=10378914](https://news.ycombinator.com/item?id=10378914)

------
tedd4u
This _so_ clearly needs to be implemented in the OS or sufficient APIs need to
be allowed for 3rd parties to implement it (à la content blocking concessions
Apple made available). Thank you f.lux team! I can check the time at night
without fully waking up!

------
cstuder
And it's gone:

    
    
      Apple has contacted us to say that the f.lux for iOS download (previously available on this page) is in violation of the Developer Program Agreement, so this method of install is no longer available.
    

Too bad, I missed out on it. I would have loved to install it on my iOS
devices, but the download is no longer available.

~~~
graeme
Wow, what a shame. I installed it before that happened, and it works great.
It's now past sundown and my phone is orange at long last.

I guess now I'm stuck on iOS 9 if I want to keep this?

For anyone who wants apple to reconsider, the feedback page is the best place,
unless you know someone inside apple:
[http://www.apple.com/feedback/iphone.html](http://www.apple.com/feedback/iphone.html)

They actually pay more attention to feedback on that form than to other forms
of complaint, rumour is.

 __edit: __it seems that the app will expire in 90 days and need to be
rebuilt. I 'll hang onto their installer and hopefully that works.

------
ronyeh
I love flux.

For those people who don't have the ability to sideload via Xcode (e.g., your
parents or non techie friends), you can teach them the iOS Low Light Filter:

[http://lifehacker.com/toggle-your-iphones-brightness-
with-a-...](http://lifehacker.com/toggle-your-iphones-brightness-with-a-home-
button-trip-1651329242)

~~~
bonobo3000
Thats what I was using until today! So glad to see flux is possible on iOS.

------
rahimnathwani
Are there any other cool side-load-only apps for iOS? (Apart from those which
require a jailbreak.)

------
graeme
Thank you! I'm actually now preparing to update to Yosemite merely to be able
to use this. It's sooo helpful for ensuring good sleep.

------
benlambt
With this I can consider switching back to iOS again.

------
devsquid
Cool! Incase you're on Android you can download
[https://play.google.com/store/apps/details?id=com.urbandroid...](https://play.google.com/store/apps/details?id=com.urbandroid.lux&hl=en)
Its basically teh same thing! I love this app! :) Glad more ppl can get flux
now on iOS

~~~
Sephr
cf.lumen is much closer to the same thing, as it actually adjusts your
screen's gamma.

~~~
devsquid
oh hmmmmm

------
deanclatworthy
Hopefully they can now concentrate on fixing the huge Mac bug that causes my
mouse to jump across the screen when your screen is being fluxed:
[https://justgetflux.com/forum/topic/77/jumping-
mouse/11](https://justgetflux.com/forum/topic/77/jumping-mouse/11)

------
Laaw
I still haven't seen any evidence to suggest LCDs perform in a comparable
manner to the light source in all those studies they cite.

Where are the studies testing F.lux directly? This is _ripe_ for all of the
best biases to take over, which makes me immensely skeptical.

~~~
PhasmaFelis
What are you objecting to specifically? I would think that, if your brain
responds to light of a particular color or intensity, it's not going to care
that the light source is an LCD.

~~~
Laaw
I am going to need more than "I would think that" if I'm going to believe
this, and considering how backlight leakage allows extra white light to emit
from your screen, I'd consider that an important enough extra variable that
needs to be accounted for before we just start equating "pure" blue lights to
the complex lightwaves that come out of an LCD monitor.

Besides, the framing of your question is wrong. I don't even need to come up
with a specific reason, the burden of proof lies on the makers of F.lux to
demonstrate that their specific product does what it says, and simply citing
inequivalent studies isn't enough.

~~~
eertami
>I don't even need to come up with a specific reason, the burden of proof lies
on the makers of F.lux to demonstrate that their specific product does what it
says

Man who the fuck cares. Millions of people use f.lux every day - personally,
it's the first thing I install on any PC or Laptop I know I'll be using for a
while.

It doesn't matter whether you have proof one way or the other.

Use it, or don't - honestly nobody gives a shit.

~~~
Laaw
I give a shit, because if I'm going to use it, I want to know if it's going to
do anything. Why suffer through the filtering it does to my monitor if it
doesn't matter?

~~~
eertami
Are you honestly so incapable of independent thought that you need someone
else to tell you what effect your life choices are having?

If you're interested, try it, see if you like it. If not, don't try it.

~~~
Laaw
That's not how science works, friend.

------
keepitsurreal
Woah, awesome! It'll be interesting to see how Apple responds to this sort of
instillation. I image with this publicity on HN we'll see other devs taking
advantage of this instillation option to bring third party apps to users who
are not jailbroken.

------
rajacombinator
Awesome! Been wanting this for so long. F.lux has made a huge positive impact
on my health.

------
fit2rule
I think this should just be a builtin at this point, and in fact it would have
been by now if it weren't for the walled-garden policies of the new
gatekeepers of the modern technological world.

------
cballard
What API is this using? The download is a binary blob :/

~~~
akwk
Inspected the symbols in the iflux binary. It's using APIs from the private
framework IOMobileFramework.framework:

IOMobileFramebufferGetGammaTable IOMobileFramebufferGetMainDisplay
IOMobileFramebufferSetColorRemapMode IOMobileFramebufferSetGammaTable

~~~
walterbell
See also
[https://github.com/thomasfinch/GammaThingy/blob/2b504461c4f1...](https://github.com/thomasfinch/GammaThingy/blob/2b504461c4f1afad839513384a754398325cc429/GammaTest/mvc/controller/GammaController.m)

------
chainsaw10
I don't suppose there's a way to do this from a non-OS X platform, is there?

I'd assume no, but I'm wondering if anyone's found a way.

~~~
cballard
Install OS X in VirtualBox?

~~~
ikurei
I've done that and it was a pain in the ass to get working. It worked, albeit
slowly. I didn't try to deploy to an iOS device from there, is that
possible/relatively easy too?

------
tempodox
This Xcode project does absolutely nothing. Am I missing something?

------
api
Stop with "sideloading." It's a silly term. It's just installing software, and
making it sound weird with a useless neologism is part of the whole power grab
that vendors have tried to ride in with mobile.

