From 2becfaaf8e245c5fc6ca82d31ffc6ccddc189963 Mon Sep 17 00:00:00 2001 From: Roland Nagy <17759980+rolandnagy@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:45:24 +0200 Subject: [PATCH] Fix hermes-engine Podfile.lock checksum inconsistency across developers Summary: See Issue: https://github.com/facebook/react-native/issues/54891 --- .../react-native/sdks/hermes-engine/hermes-engine.podspec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec index 58e003985c6d..a32c0b9cfc79 100644 --- a/packages/react-native/sdks/hermes-engine/hermes-engine.podspec +++ b/packages/react-native/sdks/hermes-engine/hermes-engine.podspec @@ -4,6 +4,7 @@ # LICENSE file in the root directory of this source tree. require "json" +require "pathname" require_relative "./hermes-utils.rb" begin @@ -92,8 +93,13 @@ Pod::Spec.new do |spec| "require.resolve(\"hermes-compiler\", {paths: [\"#{react_native_path}\"]})", __dir__]).strip ) + # Compute a relative path from PODS_ROOT to avoid absolute paths with usernames that cause different checksums across developers, + # and works regardless of project structure. + hermesc_path = "#{hermes_compiler_path}/hermesc/osx-bin/hermesc" + relative_hermesc_path = Pathname.new(hermesc_path).relative_path_from(Pod::Config.instance.sandbox_root) + spec.user_target_xcconfig = { - 'HERMES_CLI_PATH' => "#{hermes_compiler_path}/hermesc/osx-bin/hermesc" + 'HERMES_CLI_PATH' => "${PODS_ROOT}/#{relative_hermesc_path}" } end