I’m encountering an error while trying to build my React Native iOS app. The error message I’m receiving is:
Incompatible function pointer types passing ‘YGSize (YGNodeConstRef,
float, YGMeasureMode, float, YGMeasureMode)’ (aka ‘struct YGSize
(const struct YGNode , float, enum YGMeasureMode, float, enum
YGMeasureMode)’) to parameter of type ‘YGMeasureFunc’ (aka ‘struct
YGSize ()(struct YGNode *, float, enum YGMeasureMode, float, enum
YGMeasureMode)’)
I’m not entirely sure what’s causing this error or how to resolve it. From what I understand, it seems to be related to incompatible function pointer types for YGMeasureFunc.
I’ve tried researching this issue, but I couldn’t find a clear solution. Has anyone encountered a similar problem before, and if so, how did you resolve it?
2
Answers
Change YGNodeConstRef to YGNodeRef in RNDateTimePickerShadowView.m line 44 (in function RNDateTimePickerShadowViewMeasure) and everything seems back to normal)![enter image description here](data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%200%200'%3E%3C/svg%3E)
Waseem, for me reverse of this works:
Change YGNodeRef to YGNodeConstRef in RNDateTimePickerShadowView.m line 44 (in function RNDateTimePickerShadowViewMeasure) and everything seems back to normal)
https://i.sstatic.net/lQNZL3a9.png