iOS: prebuilt React, ReactNativeDependencies and hermesvm frameworks ship unstripped, adding 9.3 MB to Release apps
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- ios, macos, react-native
- Bereich
- build-system, mobile
Rechercherichtung
Start by tracing how the Release iOS framework artifacts for React Native 0.88.1 and Hermes are linked and packaged; the issue does not name the relevant build files or entry points. Run the supplied macOS reproducer against the published artifacts and compare the binary sizes before and after strip -x. Done means the shipped Release frameworks no longer retain the removable symbols and debug map described in the issue.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
The Release artifacts of the prebuilt iOS frameworks keep their local symbols and a debug map, and an app's Release archive embeds them as they are. strip -x removes 9.3 MB, 48% of the three binaries (ios-arm64 slice, React Native 0.88.1):
| Framework | Published | After strip -x |
|---|---|---|
| React | 11,894,280 | 6,370,280 (-46%) |
| hermesvm | 6,360,048 | 3,002,976 (-53%) |
| ReactNativeDependencies | 1,258,544 | 828,712 (-34%) |
The debug maps point to object files on the build machine, such as /Users/runner/work/react-native/react-native/packages/react-native/.build/output/spm/Release/Build/Intermediates.noindex/... and /Users/runner/work/hermes/hermes/build_iphoneos/.... The artifacts ship no dSYMs. Our app uses the prebuilt frameworks, the default in 0.88. In its Xcode archive the three binaries are byte-identical to the published ones, because Xcode strips only the targets it builds.
Likely cause: the Release artifacts are linked without the strip step that an Xcode archive applies to its own targets.
Related: meta/hermes#1920 (hermesvm size against the 15 MB App Clip limit).
We found this while tracking the Release sizes of the React Native example apps of Evolu (https://evolu.dev), a local-first platform.
Steps to reproduce
On macOS, run:
base=https://repo.reactnative.dev/maven2/com/facebook
for path in \
react/react-native-artifacts/0.88.1/react-native-artifacts-0.88.1-reactnative-core-release.tar.gz \
react/react-native-artifacts/0.88.1/react-native-artifacts-0.88.1-reactnative-dependencies-release.tar.gz \
hermes/hermes-ios/260318099.0.5/hermes-ios-260318099.0.5-hermes-ios-release.tar.gz; do
dir=$(mktemp -d) && curl -sSfL "$base/$path" | tar -xz -C "$dir"
for framework in $(find "$dir" -path '*/ios-arm64/*.framework' -type d); do
binary="$framework/$(basename "$framework" .framework)"
cp "$binary" "$dir/stripped" && strip -x "$dir/stripped"
echo "$(basename "$binary"): $(stat -f %z "$binary") -> $(stat -f %z "$dir/stripped") bytes after strip -x"
done
done
React Native Version
0.88.1
Affected Platforms
Runtime - iOS, Build - MacOS
Output of npx @react-native-community/cli info
Not app-specific: the script reads the published Maven artifacts. macOS 26.6.2, Xcode 27.2.
Stacktrace or Logs
React: 11894280 -> 6370280 bytes after strip -x
ReactNativeDependencies: 1258544 -> 828712 bytes after strip -x
hermesvm: 6360048 -> 3002976 bytes after strip -x
MANDATORY Reproducer
The script in Steps to reproduce: it reads the published artifacts, no app needed
Screenshots and Videos
No response
- Vorherrschende Sprache
- C++
- Sterne
- 127k
- Forks
- 25.5k
- Ø Merge
- 3 T. 18 Std.
- Gemergte PRs (30 T.)
- 188
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus react/react-native
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
react/react-native#59945 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
react/react-native#59944 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
react/react-native#59942 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
react/react-native#59939 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
react/react-native#59929 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in react/react-native
Ähnliche Issues
-
test(tools): two testkit cache tests fail unless GOCACHE and GOMODCACHE are in the environmentOffenbacklog
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
EchoTools/nevr-runtime#2385 ·
Maintainer antworten meist innerhalb von 1 Tag
-
type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
tensorflow/tflite-micro#3995 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CPU update 1.31xOffenspeed-report
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 75/100
mw00/project-maya#961 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
not for AI lovers
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
OSGeo/gdal#15515 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag