Skip to content

fix(馃悰): Don't require libs/macos to run pod install - #4005

Open
Spencer-Yoder wants to merge 3 commits into
Shopify:mainfrom
Spencer-Yoder:fix/podspec-optional-macos-libs
Open

fix(馃悰): Don't require libs/macos to run pod install#4005
Spencer-Yoder wants to merge 3 commits into
Shopify:mainfrom
Spencer-Yoder:fix/podspec-optional-macos-libs

Conversation

@Spencer-Yoder

Copy link
Copy Markdown

The podspec raises if libs/macos is missing, even when only iOS is being built. tvOS already handles its own absence gracefully a few lines below, so the two platforms behave inconsistently for the same condition.

This matters for iOS-only apps. The react-native-skia-apple-* binaries are declared as hard dependencies, so every consumer downloads all of them. An iOS-only app can never use the macOS or tvOS xcframeworks, but pruning them with an override is blocked by the raise.

Make macOS mirror the existing tvOS handling: fall back to an empty vendored_frameworks list when libs/macos is absent, and only hard-fail when libs/ios is missing. The error still fires for the case it was written for - a consumer who never ran yarn install, where libs/ios is also absent. No behaviour change when the packages are present, since libs/macos then exists and the original path is taken.

Also document the npm-side story, which was previously a single sentence: which prebuilt packages exist, which can be pruned and how, and why react-native-skia-apple-ios, react-native-skia-android and canvaskit-wasm cannot. Clarifies that these packages affect node_modules and install time but not shipped app size, which is a recurring source of confusion.

The podspec raises if `libs/macos` is missing, even when only iOS is being
built. tvOS already handles its own absence gracefully a few lines below, so
the two platforms behave inconsistently for the same condition.

This matters for iOS-only apps. The `react-native-skia-apple-*` binaries are
declared as hard `dependencies`, so every consumer downloads all of them. An
iOS-only app can never use the macOS or tvOS xcframeworks, but pruning them
with an override is blocked by the raise.

Make macOS mirror the existing tvOS handling: fall back to an empty
`vendored_frameworks` list when `libs/macos` is absent, and only hard-fail
when `libs/ios` is missing. The error still fires for the case it was written
for - a consumer who never ran `yarn install`, where `libs/ios` is also
absent. No behaviour change when the packages are present, since libs/macos
then exists and the original path is taken.

Also document the npm-side story, which was previously a single sentence:
which prebuilt packages exist, which can be pruned and how, and why
react-native-skia-apple-ios, react-native-skia-android and canvaskit-wasm
cannot. Clarifies that these packages affect node_modules and install time
but not shipped app size, which is a recurring source of confusion.
Spencer-Yoder and others added 2 commits August 14, 2026 10:15
Empty commit to re-trigger the workflow jobs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@wcandillon
wcandillon self-requested a review August 18, 2026 10:13

@wcandillon wcandillon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank You for this.
I like the podspec change, can we do the same of tv os?
The idea would be that macOS and tvOS would be optional dependencies? I would be open to the idea.
If we use this approach the documentation change would be quite different.

@Spencer-Yoder

Copy link
Copy Markdown
Author

Thank You for this. I like the podspec change, can we do the same of tv os? The idea would be that macOS and tvOS would be optional dependencies? I would be open to the idea. If we use this approach the documentation change would be quite different.

Hey @wcandillon! Thanks for looking at the PR

tvos already has the podspec skip setup for it, and that is more or less where I copied the mac OS one from.

I thought about using optional dependencies, but then it gets a little tricky if someone needs tv/mac OS and still wants to also use omit=optional (or any variation or it), their build would fail. Unless there is something I am missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants