fix(ios): remove safe area release warnings - #759
Open
huytdps13400 wants to merge 1 commit into
Open
Conversation
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
Fixes #739.
top,right,bottom,left), removing the two-Wreorder-init-listdiagnostics emitted per simulator architectureRNCSafeAreaViewState's default constructor out of the header, soRNCSafeAreaViewState.cppalways emits a real external symbol when the Android-only implementation is compiled out on Apple platformsThis keeps the constructor behavior unchanged and avoids adding a dummy symbol solely to satisfy libtool.
Test Plan
Baseline Fabric Release build on Xcode 26.5 reproduced both reorder warnings and
libtool: warning: 'RNCSafeAreaViewState.o' has no symbols.Repeated the same build after the patch:
xcodebuild -quiet \ -scheme ReactTestApp \ -workspace RNSACExample.xcworkspace \ -destination 'generic/platform=iOS Simulator' \ ONLY_ACTIVE_ARCH=NO \ -configuration Release \ CODE_SIGNING_ALLOWED=NOThe build succeeds without either safe-area-context warning. Remaining warnings are from React Native/generated third-party pods.
nm -gUon both arm64 and x86_64 Release objects reports the externalRNCSafeAreaViewStateconstructor symbols../.github/scripts/build-android.sh true— Fabric debug build succeeds for arm64-v8a, armeabi-v7a, x86, and x86_64../.github/scripts/build-android.sh false— succeeds; React Native 0.85 reports that New Architecture can no longer be disabled.yarn format:prettier:checkyarn format:clang:checkyarn validate:eslint— zero errors; three existing deep-import warningsyarn validate:typescriptyarn validate:jest— 21/21 tests, 11/11 snapshotsyarn prepare— CommonJS, ESM, and TypeScript declaration buildsyarn testwas also attempted, but its unchanged AndroidspotlessChecksubtask stalled atspotlessGroovyGradlefor over five minutes on local Gradle 9.4.1. All other test-script subcommands above were run independently; no Android/Gradle source is changed in this PR.