Open a Terminal, go to the root dir of the engine source code and type:

$ scons p=iphone target=debug

for a debug build, or:

$ scons p=iphone target=release

for a release build (check platform/iphone/detect.py for the compiler
flags used for each configuration).

Alternatively, you can run

$ scons p=iphone arch=x86_64 target=debug

for a Simulator executable.

For recent devices, Apple requires 64-bit versions of application binaries when you are uploading to the Apple Store.
The best way to provide these is to create a bundle in which there are both 32-bit and 64-bit binaries, so every device will be able to run the game.

It can be done in three steps: first compile the 32-bit version, then compile the 64-bit version and then use lipo to bundle them into one “universal” binary.
All those steps can be performed with following commands: