From 42ca06aecae81bb0f58e792924db67f250433393 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Fri, 30 Oct 2026 23:25:18 -0700 Subject: [PATCH] fix(metagen): target the macOS SDK version, as iOS does macOS metadata was generated for macos11.0, and the generator leaves out declarations introduced after the target, so everything newer than macOS 11 was missing from the embedded metadata: ScreenCaptureKit's SCStream (12.3), SCScreenshotManager (14.0), NSGlassEffectView (26.0) and the rest. iOS already targets the SDK version. --- scripts/metagen.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/metagen.js b/scripts/metagen.js index ea9ad899..14befe79 100755 --- a/scripts/metagen.js +++ b/scripts/metagen.js @@ -276,9 +276,11 @@ const sdks = { macos: { path: getSDKPath("macosx"), frameworks: [...COMMON_FRAMEWORKS, ...MACOS_FRAMEWORKS], + // The generator leaves out declarations introduced after the target OS, so + // the target is the SDK itself; classes missing at runtime resolve to undefined. targets: { - x86_64: "x86_64-apple-macos11.0", - arm64: "arm64-apple-macos11.0", + x86_64: `x86_64-apple-macos${getSDKVersion("macosx")}`, + arm64: `arm64-apple-macos${getSDKVersion("macosx")}`, }, }, ios: {