Repository navigation
fix(ios): mirror menuElementOrder in the SwiftPM header - #1261
Merged
Merged
Conversation
#1259 added an optional `menuElementOrder` member to FabricViewImplementationProtocol, but SwiftPM builds read the hand-kept spm-headers/react_native_menu-Swift.h, which did not declare it. Without it, MenuView.mm's `_view.menuElementOrder` does not compile under SwiftPM. scripts/check-spm.mjs caught this on master; #1259's CI predated that check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
masteris red since #1259: theSwiftPM packagejob fails with#1259 added an optional
menuElementOrdermember toFabricViewImplementationProtocol, andios/NewArch/MenuView.mmsets_view.menuElementOrder. SwiftPM builds compileMenuView.mmagainst the hand-keptspm-headers/react_native_menu-Swift.h, not Xcode's generated header, so without this declaration that line doesn't compile under SwiftPM. #1259's CI ran before #1257 added the check, so it wasn't caught there.Fix
Declare it in the header's
@optionalsection, next tohitSlop. It matches the Swift@objc optional var menuElementOrder: NSString?and follows the existingthemeVariantdeclaration.Verification
node scripts/check-spm.mjspasses locally: "SwiftPM package checks passed." Before this change it failed with the error above.🤖 Generated with Claude Code