fix(馃悰): Don't require libs/macos to run pod install - #4005
fix(馃悰): Don't require libs/macos to run pod install#4005Spencer-Yoder wants to merge 3 commits into
Conversation
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.
Empty commit to re-trigger the workflow jobs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
wcandillon
left a comment
There was a problem hiding this comment.
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
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 |
The podspec raises if
libs/macosis 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 harddependencies, 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_frameworkslist whenlibs/macosis absent, and only hard-fail whenlibs/iosis missing. The error still fires for the case it was written for - a consumer who never ranyarn install, wherelibs/iosis 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.