As the Monobjc bridge has to deal with a native runtime, several issues normally hidden have to be taken into account:

  • The version of the Objective-C runtime : Mac OS X 10.4 (Tiger) and Mac OS X 10.5+ (Leopard) don't have the same version of the Objective-C runtime API: for example, the class injection API differs.
  • The byte ordering : PowerPC processors uses the Big Endian byte ordering, while Intel processors use the Little Endian byte ordering.
  • The processor's registers : the use of processor's register differs when dealing with structure as return value. It depends on the platform-specific function calling conventions. On PowerPC processors, the registers are large enough to hold structure as value, while Intel processors would use a memory pointer instead.
  • Floating-point unit : Intel processors use additionnal funtion to return floating point value.
  • Mixed types: In Objective-C, some types are defined with a different width depending on the platform. NSInteger will be a 32 bits int on 32 bits platforms and a 64 bits int on 64 bits platforms.

Runtime Adaptation

The Monobjc bridge adapts its behaviour according to the version of the Objective-C runtime it detects on the machine. The list of the targeted runtimes is:

  • Objective-C 1.0 (Mac OS X 10.4)
  • Objective-C 2.0 (Mac OS X 10.5 and later)

Processor Adaptation

The Monobjc bridge also adapts its behaviour according to the processor it detects on the machine. The list of the targeted processors is:

  • PowerPC 32bits
  • Intel x86 32bits
  • Intel x64 64bits

Currently, Intel 32/64 bits are supported. Support for 32 bits PowerPC has been deprecated since the Mono runtime does not support it.