Quote Originally Posted by Relfos View Post
Thanks! I've been reading about Cocoa, and Objective Pascal, and how it all works, I still need some days to understand it correctly.
My next question, tough, this should be probably in a new topic:
Today I managed to compile a Free Pascal program for iPhone using XCode and the included template.
However when reading the code, I found that it was not 100% pascal, at least half of the code were Objective C, and the pascal code was declared as external in a library.
I understand how this works, but is it the only way?
Or can one create an app for iPhone that uses only pascal, and is compiled just using the command line?
You mean the Objective-C library called FPC code? I have messed a lot with mixing C and FPC code, and recently learned the right way to do that, and that is indeed to put all the FPC code in a separate dylib library (shared library). It is theoretically possible to do static linking, but don't even try, it is not worth it.

However, the Objective Pascal dialect works very well (Stoney's suggestion #2). That's what you should use. It is still changing, which can be a bit frustrating at times, but it works.