You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
image not visible without setting imageColor #1034
After investigation, this is due to a value unboxing issue: in ios/Shared/RCTMenuItem.swift line 35,
if letimageColor=details["imageColor"]{
If you don't provide imageColor on the JS side, the imageColor value here will be resolved to 0, thus the image will be converted with RCTConvert.uiColor(0)
To solve this issue temporarily I add a small patch that rewrites line 35 into:
if letimageColor=details["imageColor"],(imageColoras?Int)!=0{
Although this didn't solve the actual issue, just a workaround.
Fixed by #1195, released in v2.3.2. On the New Architecture, codegen gave an omitted imageColor a default of 0, and the bridge forwarded it, so RCTConvert.uiColor(0) tinted the icon fully transparent (as @teaualune traced). The bridge no longer forwards that default, so an image without imageColor renders with UIKit's default tint again. Thanks everyone for the reports and the investigation!
Activity
teaualune commentedon Mar 10, 2025
I've ran into this issue on new arch as well
After investigation, this is due to a value unboxing issue: in
ios/Shared/RCTMenuItem.swiftline 35,If you don't provide
imageColoron the JS side, theimageColorvalue here will be resolved to0, thus the image will be converted withRCTConvert.uiColor(0)To solve this issue temporarily I add a small patch that rewrites line 35 into:
Although this didn't solve the actual issue, just a workaround.
tmoran-stenoa commentedon Apr 23, 2025
Thank you @teaualune, your patch worked for me.
Naturalclar commentedon Nov 22, 2026
Fixed by #1195, released in v2.3.2. On the New Architecture, codegen gave an omitted
imageColora default of0, and the bridge forwarded it, soRCTConvert.uiColor(0)tinted the icon fully transparent (as @teaualune traced). The bridge no longer forwards that default, so animagewithoutimageColorrenders with UIKit's default tint again. Thanks everyone for the reports and the investigation!