Skip to content

[ios][precompile] Fixed symbol mapping to slices#54641

Closed
chrfalch wants to merge 1 commit into
mainfrom
chrfalch/fix-symbol-mapping-to-slices
Closed

[ios][precompile] Fixed symbol mapping to slices#54641
chrfalch wants to merge 1 commit into
mainfrom
chrfalch/fix-symbol-mapping-to-slices

Conversation

@chrfalch

Copy link
Copy Markdown
Collaborator

Summary:

Previously the symbolication support when using the precompiled React.XCFramework copied the symbol bundles to the wrong folder in the framework, causing Xcode to not find the symbols.

This commit fixes this by copying symbols to the correct slice folders instead of in the root of the framework folder.

Note:
Running pod cache clean --all and rm -rf Pods in the iOS folder followed by a clean rebuild in Xcode might be a good thing to ensure you're using the correct binaries when compiling.

Changelog:

[IOS] [FIXED] - Fixed copying symbol bundles into correct slice folder

Test Plan:

npx @react-native-community/cli init Next --version next --skip-install
cd Next
yarn
cd ios
bundle install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 bundle exec pod install

Run Xcode and observe that you are not able to step into React Native source code.

After this fix, you should be able to step into the source code of React Native.

Previously the symbolication support when using the precompiled React.XCFramework copied the symbol bundles to the wrong folder in the framework, causing Xcode to not find the symbols.

This commit fixes this by copying symbols to the correct slice folders instead of in the root of the framework folder.

Reproduction:

```
npx @react-native-community/cli init Next --version next --skip-install
cd Next
yarn
cd ios
bundle install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 bundle exec pod install
```

Run Xcode and observe that you are not able to step into React Native source code.

After this fix, you should be able to step into the source code of React Native.

Note:
Running `pod cache clean --all` and `rm -rf Pods` in the iOS folder followed by a clean rebuild in Xcode might be a good thing to ensure you're using the correct binaries when compiling.
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 23, 2025
@chrfalch chrfalch requested a review from cipolleschi November 23, 2025 16:41
@facebook-github-bot facebook-github-bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Nov 23, 2025
@meta-codesync

meta-codesync Bot commented Nov 26, 2025

Copy link
Copy Markdown

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this in D87919202.

slice_name = File.basename(dsym_path)
slice_dsym_dest = File.join("React.xcframework", slice_name, "React.framework", "dSYMs")
rncore_log(" Adding dSYM slice #{slice_name} into tarball at #{slice_dsym_dest}")
`(cd "#{File.dirname(frameworkTarPath)}" && mkdir -p "#{slice_dsym_dest}" && cp -R "#{dsym_path}/." "#{slice_dsym_dest}" && tar -rf "#{frameworkTarPath}" "#{slice_dsym_dest}")`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this could be simplified just because is too long. I would avoid doing a cd before, you can invoke all the commands from the current directory.

In theory this could just be a tar invocation with -C which changes the working directory only for tar?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also that's a nit

@cortinico cortinico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@meta-codesync

meta-codesync Bot commented Nov 26, 2025

Copy link
Copy Markdown

@cipolleschi merged this pull request in ac31e96.

react-native-bot pushed a commit that referenced this pull request Dec 2, 2025
Summary:
Previously the symbolication support when using the precompiled React.XCFramework copied the symbol bundles to the wrong folder in the framework, causing Xcode to not find the symbols.

This commit fixes this by copying symbols to the correct slice folders instead of in the root of the framework folder.

Note:
Running `pod cache clean --all` and `rm -rf Pods` in the iOS folder followed by a clean rebuild in Xcode might be a good thing to ensure you're using the correct binaries when compiling.

## Changelog:

[IOS] [FIXED] - Fixed copying symbol bundles into correct slice folder

Pull Request resolved: #54641

Test Plan:
```
npx react-native-community/cli init Next --version next --skip-install
cd Next
yarn
cd ios
bundle install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 RCT_SYMBOLICATE_PREBUILT_FRAMEWORKS=1 bundle exec pod install
```

Run Xcode and observe that you are not able to step into React Native source code.

After this fix, you should be able to step into the source code of React Native.

Reviewed By: cortinico

Differential Revision: D87919202

Pulled By: cipolleschi

fbshipit-source-id: 029bca3e182c170562e358beb50592d5b91d8e8b
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @chrfalch in 2bc6b00

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants