Repository navigation
Conversation
The prebuilt React and ReactNativeDependencies frameworks shipped with all local symbols. Neither the SwiftPM embed phase nor the CocoaPods embed script strips them, so apps carried the extra size into the App Store. For the Release flavor, the prebuild scripts now run `strip -x` on each slice's framework binary after its dSYM has been copied, so crash symbolication keeps working. A slice that was signed before the strip is re-signed ad hoc. For React, this runs after the framework headers are written. CI now passes the flavor to the ReactNativeDependencies compose step, which defaulted to Debug.
Visual regressionNo visual differences at ios: no capture |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
The prebuilt iOS frameworks React and ReactNativeDependencies ship with all their local symbols. No build step removes them:
rsync. The CocoaPods embed script only removes unused architectures.So every app that uses the prebuilt frameworks carries the extra size.
This PR strips the Release frameworks when the artifact is built. One change covers SwiftPM apps and CocoaPods apps.
xcrun strip -xon each slice's framework binary.strip -xremoves local symbols only, so exported symbols stay. Debug builds are not stripped, so a debugger still shows the symbols without a dSYM download.Symbolsfolder. The dSYM comes from the unstripped binary and keeps the same UUID, so crash symbolication keeps working. A missing dSYM now stops the build with a clear error.Headers/andModules/into eachReact.framework.prebuild-ios-dependencies.ymlnow passes-r ${{ matrix.flavor }}to the ReactNativeDependencies compose step. Without the flag, that step always used Debug and never reached the strip. The new helperstrip-symbols.jsis also added to that workflow's cache key.Not in this PR:
hermesvm.xcframework. It is built outside this repository.Changelog:
[IOS] [CHANGED] - Strip local symbols from the Release prebuilt React and ReactNativeDependencies frameworks
Test Plan:
Unit tests:
Result: 12 suites, 116 of 116 tests passed. The new tests failed before the code change: strip after the dSYM copy, Debug not stripped, missing dSYM throws, re-sign only when signed before, and strip after the header step.
yarn flow-checkandeslint --max-warnings 0on the changed files: no errors.Real Release build, on this branch:
Checks on each slice:
dwarfdump --uuidgives the same UUID for the stripped binary and its dSYM, on the device slice and on both simulator architectures.codesign --verify --deep --strictpasses on the React and ReactNativeDependencies simulator frameworks. Device frameworks stay unsigned, as before.nm -gUgives the same number of exported symbols before and after the strip.Not run: a CI build with a real signing identity.