Frage

If I run this command:

file /System/Library/Frameworks/GameKit.framework/GameKit

I get:

/System/Library/Frameworks/GameKit.framework/GameKit: Mach-O 64-bit dynamically linked shared library x86_64

Which equates to my iMac (a brand new one) is missing the x86 version of GameKit. So my x86 Mac application (it is a C# Xamarin.Mac app) crashes when referencing GameKit.

Does anyone know if this is going to be an ongoing issue for future Macs? Or is it an Apple bug that this is missing on my machine?

War es hilfreich?

Lösung

Everything points to Apple deprecating 32-bit (architecture i386) code at some point. This is because they took advantage of switch from 32-bit to 64-bit code to add features to the Objective-C runtime, making 64-bit runtime more featureful.

I have no confirmation for this, but judging from how PowerPC transition was handled, and how 64-bit code deprecates loads of ancient technologies, this is probably not far off.

Although I do have 32-bit GameKit on my machine, it would not surprise me at all if a future release of OS X might contain no 32-bit code. And since all Macs that contain GameKit must be able to run 64-bit code (a requirement for Mountain Lion), the best advice I can give is to add a 64-bit version of the app. I have no idea if MonoMac supports 64-bit code, but that's the direction you should go to.

I suspect an OS update (such as the upcoming 10.8.3) might install a version of GameKit that happens to contain 32-bit code. Or it might remove 32-bit code for the rest of us. But I would absolutely not count on Apple maintaining or adding new features to 32-bit code, precisely because many features that they like (such as ARC or synthesizing ivars) can't be supported by the so-called 32-bit Objective-C runtime without breaking binary compatibility.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top