Skip to content

fix: preserve default menu icon colors on iOS new arch - #1195

Merged
Naturalclar merged 2 commits into
react-native-menu:masterfrom
michaelpomogajko:fix/new-arch-ios-menu-icons
Nov 22, 2026
Merged

Naturalclar merged 2 commits into
react-native-menu:masterfrom
michaelpomogajko:fix/new-arch-ios-menu-icons

Conversation

@michaelpomogajko

Copy link
Copy Markdown
Contributor

Summary

  • stop forwarding imageColor and titleColor from the New Architecture bridge when they were not explicitly set in JS
  • keep the existing behavior for explicitly provided colors

Root cause

In the Fabric/New Architecture path, codegen turns optional imageColor and titleColor fields into plain integer props with a default value of 0. MenuView.mm always forwarded those values into the Objective-C action dictionaries, so iOS treated missing imageColor as a real color and tinted SF Symbols to an invisible color.

This shows up as menu titles rendering correctly while icons disappear entirely on iOS New Architecture, even when the JS action config follows the documented API.

Validation

  • reproduced in an Expo 55 / React Native 0.83 app using @react-native-menu/menu 2.0.0
  • verified that icons render again after omitting unset color props from the New Arch bridge
  • change is scoped to ios/NewArch/MenuView.mm only

@Naturalclar Naturalclar reopened this Nov 22, 2026

@Naturalclar Naturalclar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Dropping imageColor/titleColor from the Fabric bridge when they hold codegen's default 0 fixes this where the bogus value comes from, so both readers (RCTMenuItem and RCTAlertAction) fall back to UIKit's default tint through their existing if let. Old arch and Android are untouched. CI is green against current master.

@Naturalclar
Naturalclar merged commit 3b245a8 into react-native-menu:master Nov 22, 2026
6 checks passed
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.

2 participants