Latest info about the FreePascal compiler for iPhone from Jonas Maebe...
I'm happy to announce that the first version of FPC for the iPhone SDK 2.x is available. It includes an Xcode template to build the demo application that I mentioned in my message last week.

Note that unlike other FPC releases, this installer will install the FPC sources (of FPC 2.3.1, svn revision 12530 of today) and a script, and will then launch this script in order to compile FPC (after you tell it where you installed the iPhone SDK, so it can generate a Pascal version of some required C headers). This modus operandi is necessary to comply with the iPhone SDK agreement's stipulation that no derived works of the SDK may be distributed.

Requirements:
* Intel Mac (because the iPhone SDK requires an Intel Mac)
* iPhone SDK 2.x installed (only tested with 2.2 though)
* FPC 2.2.2 or a later FPC 2.2.x release installed

Some features:
* Simulator support (it turned out to be trivial to add)
* the Xcode template transparently supports (requires, actually) integrating Pascal and Objective-C source files into a single application
* Pascal translation of the OpenGL ES 1.1 C-header from the SDK (this one I can distribute, because it's licensed under an SGI open source license), available in the gles11 unit

Please read the entire ReadMe.rtf on the installer disk image before asking for help. It contains quite a bit of information on things to watch out for (especially when using the Simulator), and how to change the included template when adding extra Pascal source files.

The installer disk image is available here (17MB -- there are also advantages to only distributing the source): ftp://ftp.freepascal.org/fpc/snapshot/v23/arm-macosx/fpc-2.3.1v1.arm-iphone.dmg

If you encounter problems with the script that is launched when the installer finishes the installation, please always provide the entire contents of the Terminal window in which the script was executed when asking for help.

Also, to make it clear: FPC cannot work around the requirement of having an Apple-issued certificate to run self-written programs on an iPhone/iPod Touch. So you have to sign up to Apple's iPhone Developer program ($99/year) to run FPC-compiled programs on the real hardware (just like for regular Xcode-compiled programs).

Without such a certificate, you can only run programs on the simulator (possibly unless you have a jailbroken iPhone/iPod Touch, but in that case you are on your own; I will not involve myself with jailbreaks, to avoid any potential legal troubles with the status of this FPC port).

Enjoy,

Jonas