diff --git a/packages/react-native/scripts/cocoapods/rncore.rb b/packages/react-native/scripts/cocoapods/rncore.rb index b8d3905d73d4..a048834c20e4 100644 --- a/packages/react-native/scripts/cocoapods/rncore.rb +++ b/packages/react-native/scripts/cocoapods/rncore.rb @@ -271,9 +271,10 @@ def self.remap_sourcemaps_for_symbols(symbolsPath) return if dsym_bundles.empty? # Define source path mappings - from absolute build paths to relative framework paths + # Expand the path relative to the installation root (project root, parent of ios/) + react_native_absolute_path = File.expand_path(@@react_native_path, Pod::Config.instance.installation_root) mappings = [ - # Make sure to make react_native_path absolute - ["/Users/runner/work/react-native/react-native/packages/react-native", "#{File.expand_path(@@react_native_path)}"], + ["/Users/runner/work/react-native/react-native/packages/react-native", react_native_absolute_path], ] dsym_bundles.each do |dsym_path| begin