Apple won't let apps use APIs that aren't officially approved. Officially approved APIs can't do the things that flux needs to do. So, no flux on iOS in the App Store. The flux developers put together a beta that used said APIs and made it available for sideloading. Apple killed that off as well by threatening to kill their account due to a violation of the Developer Agreement which prohibits distributing your app anywhere but the App Store. Apple will only let apps onto iOS devices via the App Store. No side loading, no direct downloads, no third party app stores.
The confusion is that the "sideloading" was just an Xcode project along with instructions for how to build it. It's hard to figure out what part of that is supposed to be a violation. Are you not supposed to provide Xcode projects to other people? Are you not supposed to tell them how to use Xcode? Or is it just the fact that they were too overt about the purpose of it all?
You don't have to be in the Apple developer program to post an Xcode project on a web site. Nor to download Xcode, since it comes free from the Mac App Store.
Lowercase free is not the same as uppeprcase Free. Xcode is freeware (as in no cost) but it has a restrictive 14 page license attached to it that you must agree to to use it.
https://www.apple.com/legal/sla/docs/xcode.pdf
You can only allow third parties to install your app on their devices for testing if you have written approval from Apple.
You can only use a limited number of devices that you/your company own for testing.
Your license to use Xcode, the SDKs, and release software for iOS can be revoked at any time: "Apple reserves the right to revoke, disable or suspend any Provisioning Profiles or any access to the device deployment and provisioning features of the Apple Software and Services at any time, in its sole discretion. By way of example, Apple may do this if Apple has reason to believe that Apple IDs were fraudulently obtained, that an unreasonable number of devices have been entered into the Apple Software, and/or that the Services are being used in a fraudulent, suspicious, or improper manner."
> it has a restrictive 14 page license attached to it that you must agree to to use it //
That you're supposed to agree to. What proportion of the users of Xcode do you suppose have even read that license?
Also the license doesn't prevent you using it, though it possibly prevents you from legally using it for commercial purposes in most developed nations.
With the recent case concerning sending data abroad to process to circumvent patent restrictions it seems that f.lux could just have someone in a country with no copyright/license restrictions download Xcode, compile and make available the software. Apple Computers after all wouldn't own code created with Xcode, which would be a technical rather than artistic work anyhow, so there doesn't appear to be a problem of copyright.
Apple could likely still pull strings that the f.lux people wouldn't find helpful however (maybe the devs have other apps that Apple could block, for example).
I am not sure what you mean by 'supposed to' agree to the license. You are correct in that the license doesn't self-enforce, but legally you have agreed to follow the license when you download the code. So, Apple can take legal action to enforce compliance with the license, which is what they did whey they sent a C&D notice to f.lux.
A license can restrict non-commercial purposes, too (as long as they aren't purposes protected by law, e.g. fair use). While it is true that most companies only go after license violators who are using the software for commercial purposes, that is only for practical reasons, not legal.
A license can restrict use, but copyright concerns copying. They allow copying of the code, which is necessary for use, but attempt to acquire acquiescence to their license terms. I'm not sure however as there is no consideration how users can be considered to be under license. In short if the copying is fair-use, which it looks like it reasonably could be, then how can the use be controlled?
What if they, hypothetically, developed their code with a separate toolchain/IDE and didn't use xcode at all? Are they still bound by the terms of it, or is it the users compiling the app to put on their phones bound by it? I'm also pretty sure advocating people violate a license agreement isn't illegal, or did Apple get an exemption for the first amendment?
I realize f.lux was distributing a compiled binary instead of telling people to compile it from source, but I think Apple would have sent them a C&D just the same if it were just source.
I think it has to be something to do with the binary component. I can't see this being an issue if they'd delivered all source code in their project and required users to build the entire thing.
I think you're correct. They were distributing an iOS app outside of the approved channels, which is explicitly called out near the very top of the Apple Developer License Program agreement:
Applications developed under this Agreement for iOS Products, Apple Watch, or Apple TV can be
distributed in four ways: (1) through the App Store, if selected by Apple, (2) through the B2B
Program area of the App Store, if selected by Apple, (3) on a limited basis for use on Registered
Devices (as defined below), and (4) for beta testing through TestFlight.