Skip to content

fix(ios): stabilize podspec checksum - #72

Open
huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/58-stable-podspec-paths
Open

huytdps13400 wants to merge 1 commit into
margelo:mainfrom
huytdps13400:fix/58-stable-podspec-paths

Conversation

@huytdps13400

Copy link
Copy Markdown

Summary

  • keep the detected React Native Skia path relative inside the serialized podspec
  • anchor the header search path to PODS_TARGET_SRCROOT
  • preserve both nested and hoisted node_modules layouts for the framework copy step

Fixes #58.

Root cause

The podspec built skiaPath with __dir__, so CocoaPods serialized the consumer's absolute checkout path into both HEADER_SEARCH_PATHS and prepare_command. Because the podspec JSON changed for every project location, its checksum changed as well.

The podspec still detects whether Skia is nested or hoisted, but now stores only the relative segment. Xcode receives a target-root-relative header path, while prepare_command continues to run from the pod source root.

Verification

  • Before the fix, pod ipc spec through two paths to the same source produced different SHA-256 values (4bf472… vs 641272…).
  • After the fix, both paths produce the same serialized spec checksum (1d8cf3…).
  • Confirmed the serialized spec contains no checkout-specific /tmp or absolute source path.
  • Executed the generated prepare_command successfully with both nested and hoisted React Native Skia layouts; both xcframeworks were copied.
  • pod install completed successfully for the repository example (61 pods installed, including react-native-skia-skottie 2.1.4).
  • yarn test --runInBand
  • yarn typecheck
  • yarn lint
  • yarn prepack && yarn postpack
  • ruby -c react-native-skia-skottie.podspec
  • git diff --check

Only the podspec is committed; generated Pods, build output, and lockfile changes are excluded.

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.

pod install generates a new checksum in Podfile.lock for every root location

1 participant