Plus, I’ve found that most iOS codebases, tend to rely on parts of Foundation and the Objective-C runtime that are not implemented on Linux, even if the code doesn’t touch UIKit at all.
In this case I meant taking an approach similar to this one for bazel[0] that is not limited to only code that works on Linux. It would only allow you to build on Linux and would require any testing / running would still happen on macOS, but that might still be worth it in some cases. Theoretically you could deploy your iOS app that way as well.