I mean is Objective-C the only language available, or can you use a standard C compiler/linker that is optimized for the sufficient executable format(Mach-O/PEF)?

My basic question is, can other languages be used to generate the equivalent object, binary, or otherwise shared library file format of code parsed and loaded by Mac OS X-like versions?

(E.g., C, C++, D, etc.?)


You can use C or C++ too to compile binaries and executables. Objective-C is mainly the source for developing for the MacOS user interface (Cocoa), but even there is still the old school interface (Carbon) available, just for the latter sample projects and docs are hard to find these days.

But if you want to create a tool that works like classic unix tools (stdin/stdout) or a shared library, C or C++ are absolutely viable solutions. E.g. you can download Xcode and from the Gui or command line (gcc) you can easily compile a simple int main(int, char**) { printf("Hello World!"); return 0; } program.

Also, Objective-C is just a C-extension, so you don't have to use its features.

  • But can you use C++ to call Cocoa API functions? Seems like it might be possible if there was a glue layer between the C++ and Objective-C calls, but is there such a thing? – Eric May 31 '13 at 23:14
  • 1
    @Eric not exactly but using Objective-C++ means you can use both C++ and Cocoa. You can also use other C++ GUI librries like Qt++, GTK, Wx. But really best to learn Objective C – user151019 May 31 '13 at 23:52
  • @Eric You can use the objective-c runtime library (C functions), specifically objc_msgSend and sel_registerName. See /usr/include/objc/objc.h and message.h. An objective-c compiler actually maps every message to a call of objc_msgSend. – ughoavgfhw Jun 1 '13 at 0:55
  • @Eric. Mark is right, there is Objective-C++, which is basically an extension to C++ and which lets you use Cocoa from C++. – Grezgory Jun 1 '13 at 9:26

There are lots of other languages that can be used to create iOS apps. Xojo is one of the easier ones to start with if you don't have substantial coding experience.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .