Files
Cristian Magherusan-Stanciu 1345d3be46 feat(GameKit): add stub framework
Chess.app aborts in dyld before any dependent library is mapped, on
"Library not loaded: .../GameKit.framework/Versions/A/GameKit". Darling
has no GameKit, and no open-source implementation exists to vendor.

This stub provides the eight Objective-C classes Chess binds against,
behaving as Game Center unavailable: the local player is never
authenticated and every request completes with GKErrorNotSupported, the
same result an app gets on macOS when Game Center is unavailable.

What this does NOT do: it does not make Chess launch. Chess has 27 strong
dependencies, 3 of them missing. Past GameKit it fails on Combine (8
Swift symbols), then GroupActivities (53). Both are Swift-ABI and need
nominal type descriptors and protocol conformance records, which neither
class-dump nor darling-stub-gen can produce.

The surface is scoped to what the consumer measurably binds, not to
Apple's full API: every entry point here fails, so an unreferenced
declaration would add no behaviour and only imply support that does not
exist. One deliberate exception is GKAchievement.player -- Chess sends a
bare "player" whose receiver cannot be determined from the binary, so it
is kept rather than risk doesNotRecognizeSelector:.

Symbol surface was taken from the consumer (llvm-nm -u --arch arm64e on
Chess, plus its __objc_methname selectors), not from an Apple framework
binary. Counts are per slice; the binaries are fat and a bare llvm-nm
sums every slice. Measured 2026-09-20 against that day's binaries.

Verified: builds and links in a clean tree at this base, with no warnings
from GameKit.m, and the built library exports exactly the eight classes
Chess requires -- no more, no less. Not verified: Chess getting past
GameKit at runtime, which needs a container launch.

Comment density in the header is above the usual bar. Every comment
records a decision and the evidence for it rather than restating code,
which is the category worth its lines for a stub whose value is in what
it deliberately omits.

Note for the next public-framework stub: three source files and one
add_subdirectory line are not sufficient. Four committed symlinks
(mode 120000, not generated by generate_sdk_framework) are also needed --
framework-include/<Name> and the SDK framework's Headers, Versions/Current
and Versions/A/Headers. Compare against GameController, which is tracked
on every branch here.
2026-09-21 00:35:27 +02:00

Symbolic link
1 line
116 B
Plaintext

../Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/GameKit.framework/Headers