Skip to content

Conversation

@NicoHinderling
Copy link
Contributor

@NicoHinderling NicoHinderling commented Nov 4, 2025

📜 Tickets

Jira ticket
Github issue

💡 Description

⚠️ This PR should only be considered and landed if dSYMs for the firefox app are being uploaded to the crash reporter(s) being used. That way any issues will still include symbolicated crash reports.

While analyzing the Firefox app, we noticed that binary symbols are currently always included. This is not a requirement for production if we separately upload the dSYMs to a crash reporter, and stripping these symbols can ultimately net a 50mb install size reduction for production users!

🎥 Demos

(TODO: update PR description with before and after info about the size changes)

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@NicoHinderling NicoHinderling requested a review from a team as a code owner November 4, 2025 02:01
@lmarceau lmarceau requested a review from nbhasin2 November 4, 2025 14:29
@jrmuizel
Copy link

jrmuizel commented Nov 4, 2025

@NicoHinderling is this usual way for iOS apps to not ship symbols to devices? The shell script makes it seems like it's pretty involved.

@mobiletest-ci-bot
Copy link

🧹 Tidy commit

Just 1 file(s) touched. Thanks for keeping it clean and review-friendly!

💬 Description craftsman

Great PR description! Reviewers salute you 🫡

✅ Per-file coverage

All changed files meet the threshold of 35.0%.

Generated by 🚫 Danger Swift against 6db8473

@NicoHinderling
Copy link
Contributor Author

@NicoHinderling is this usual way for iOS apps to not ship symbols to devices? The shell script makes it seems like it's pretty involved.

Hey @jrmuizel thanks for the quick review! There are definitely other ways that it can be done. I think the main other approach is to just run strip -rSTx (ex. strip -rSTx AppBinary -o AppBinaryStripped) on your binary after the build process is completed.

With a bit of testing, this other approach should be able to net an equivalent size reduction as the script. I just wanted to share the script first since it's something I could easily make a PR for at the very least :)

⚠️ As mentioned in the PR though, both the script or the extra strip command should only be implemented with testing done alongside your crash reporter (and the related dSYMs uploaded to that crash reporter) to make sure errors and crash reports can still be symbolicated!

@thatswinnie
Copy link
Collaborator

@NicoHinderling thanks for creating this PR 🙏
From reading this article it seems we will to add an input file to make sure the dSYMs are created so we can upload them before the symbols are stripped. Could you please add ${DWARF_DSYM_FOLDER_PATH}/${EXECUTABLE_NAME}.app.dSYM/Contents/Resources/DWARF/${EXECUTABLE_NAME} as input file?

inputFileListPaths = (
);
inputPaths = (
"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${EXECUTABLE_NAME}",
Copy link
Collaborator

@thatswinnie thatswinnie Nov 5, 2025

Choose a reason for hiding this comment

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

This seems to be the path for a different "Run Script" phase (not the newly added Strip Symbols one you added). Could you please add it to the correct build phase?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

woops! 🙈 good catch

@NicoHinderling
Copy link
Contributor Author

@NicoHinderling thanks for creating this PR 🙏 From reading this article it seems we will to add an input file to make sure the dSYMs are created so we can upload them before the symbols are stripped. Could you please add ${DWARF_DSYM_FOLDER_PATH}/${EXECUTABLE_NAME}.app.dSYM/Contents/Resources/DWARF/${EXECUTABLE_NAME} as input file?

yes definitely. I accidentally placed the input file on the wrong script but that's now resolved. As for the input file path, I work with the main author of that blog post and synced up with them. Apparently DWARF_DSYM_FILE_NAME is more flexible than ${EXECUTABLE_NAME}.app.dSYM, and ${EXECUTABLE_NAME} is slightly better than ${TARGET_NAME}. I've gone ahead and updated that docs page to reflect this modification to the input file path!

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.

4 participants