While it is possible to compile for iOS on a Linux environment, Apple is
very restrictive about the tools to be used (especially hardware-wise),
allowing pretty much only their products to be used for development. So
this is not official. However, a statement from Apple in 2010
says they relaxed some of the App Store review guidelines
to allow any tool to be used, as long as the resulting binary does not
download any code, which means it should be OK to use the procedure
described here and cross-compiling the binary.

Copy the tools to a nicer place. Note that the SCons scripts for
building will look under usr/bin inside the directory you provide
for the toolchain binaries, so you must copy to such subdirectory, akin
to the following commands:

Once you’ve done the above steps, you should keep two things in your
environment: the built toolchain and the iPhoneOS SDK directory. Those
can stay anywhere you want since you have to provide their paths to the
SCons build command.

For the iPhone platform to be detected, you need the OSXCROSS_IOS
environment variable defined to anything.

$ exportOSXCROSS_IOS=anything

Now you can compile for iPhone using SCons like the standard Godot
way, with some additional arguments to provide the correct paths:

Apple requires a fat binary with both architectures (armv7 and
arm64) in a single file. To do this, use the
arm-apple-darwin11-lipo executable. The following example assumes
you are in the root Godot source directory: