Mach-O and Cocoa

Mach-O is the native runtime model on macOS. This is the file format of the executable, object code, shared and dynamically loaded libraries. This format can contain binaries compiled for different architectures at the same time and in the same file. Unlike the Windows’ DLL or Linux’ ELF shared object format, the macOS’ shared (dylib) and dynamically-loaded (bundle) libraries are distinguished. Please note that the Archicad add-ons are always dynamically-loaded (bundle-format) libraries.

Cocoa is the only API supported on 64-bit systems. On Archicad uses this API since version 14.

What does this mean to you?

  • Archicad makes it easy to call Cocoa system functionality. An example for that is the Spell Checker add-on, which calls the spell checker built into the system directly, without a need for any wrapper bundle.
  • You can easily call Objective-C functions.
  • The main event loop uses [NSApp run].
  • All windows and controls are Cocoa elements. The macOS part of the DG Library (dialog manager) is written in Objective-C.

For more information, please visit Apple’s developer site. You can also read the related Wikipedia articles about Mach-O and Cocoa API.