Repository navigation
fix(metagen): target the macOS SDK version, as iOS does - #104
Open
NathanWalker wants to merge 1 commit into
Open
NathanWalker wants to merge 1 commit into
NathanWalker wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Closed
8 tasks done
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.
NathanWalker
force-pushed
the
fix/metagen-macos-sdk-target
branch
from
November 20, 2026 21:24
d32a75a to
42ca06a
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
macos: { 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")}`, }, },The metadata generator leaves out declarations introduced after its
-targetOS. macOS was pinned to 11.0, so the embedded metadata of@nativescript/macos-node-apihas nothing newer than macOS 11. That rules out ScreenCaptureKit's capture classes, even thoughScreenCaptureKitis inMACOS_FRAMEWORKS, as well as Liquid Glass and everything else from 12 onward. iOS already targets the SDK version. A class the running OS doesn't have resolves toundefined, as on iOS.Evidence
The same generator binary and SDK (macOS 27.0) were used for both runs. Only the target differs. The metadata was loaded into a 0.5.0-beta.0 runtime with
METADATA_PATH:arm64-apple-macos11.0, 4.7 MB):SCStream undefined, SCShareableContent undefined, SCScreenshotManager undefined, NSGlassEffectView undefinedAfter (
arm64-apple-macos27.0, 6.5 MB):SCStream function, SCShareableContent function, SCScreenshotManager function, NSGlassEffectView functionFound while building the ns-edge desktop hosts. They stream a window with
SCStreamand have been bundling separately generated metadata to work around this.Merge Danger
Door: two-way
Revert to restore the 11.0 target.
Blast Radius: metadata
The macOS metadata grows by about 1.8 MB. Generated typings and metadata for macOS now include APIs newer than macOS 11. Code that relied on a newer class being
undefinedin metadata on every OS would now see it defined where the OS has it.