Doesn't that still leave the problem with "using apple tools"? Currently, the only way I know of to compile apps that run on iPhones are xcode, on a macintosh.
Even when using frameworks like flutter I'm pretty sure you still need to use an apple compiler to make the final build, right?
I don't think that you have to use Apple toolchain, it's just way way easier to do so. I think there was some linux toolchain that you can use to build binaries for iOS.
On a non-jailbroken devices you will need to sign your binary with Apple's help but on a jailbroken device you can install whatever you want. It's also perfectly legal.
Besides, some hacking companies manage to install their malware on non-jailbroken devices.
There is no 3rd-party toolchain that you can use for a complete iOS (or even MacOS) build. Even if you cross-compile the majority of your code, you will need to transfer the binaries to a Mac for code signing. Everywhere I've worked that has produced Mac builds has had at least a small cluster of Mac machines to perform code signing. (But usually at this point, you just give up and perform the entire build on the Mac cluster.)
Technically you don't need it. There's no mechanism preventing another toolchain from producing an iOS build. It's just nobody is interested in creating an alternative toolchain.
Even when using frameworks like flutter I'm pretty sure you still need to use an apple compiler to make the final build, right?