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 5 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 I tested it on npm 10.9.4 and Yarn 4.18.0, including the case where the packages sit one level down. With the It does nothing for the android package, since Gradle runs on Linux too, and it needs the podspec change in this PR. Happy to do that PR on top of this one. |
|
@ForestSpark I think I like this direction, I would be open to a PR for this. It might not help @Spencer-Yoder here as maybe we want to avoid tvOS and macOS even on a mac setup? Let me know. |
|
@ForestSpark that is a good idea and that would help a lot, especially on most CI runners. I still think having the ability to skip it on mac's would beneficial for poor internet or metered connections. Feel free to build on my PR, or if you want I can included it here. |
|
Opened #4042 for the optional dependencies, stacked on this PR. The |
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.