datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

incompatible function pointer types passing YGNodeConstRef

Open hertzg opened this issue 1 year ago • 1 comments

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @react-native-community/[email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
index 4ff3362..c139440 100644
--- a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
+++ b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
@@ -41,7 +41,7 @@ - (void)setTimeZoneName:(NSString *)timeZoneName {
   YGNodeMarkDirty(self.yogaNode);
 }
 
-static YGSize RNDateTimePickerShadowViewMeasure(YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
+static YGSize RNDateTimePickerShadowViewMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
 {
   RNDateTimePickerShadowView *shadowPickerView = (__bridge RNDateTimePickerShadowView *)YGNodeGetContext(node);
 

This issue body was partially generated by patch-package.

This is the opposite of https://github.com/react-native-datetimepicker/datetimepicker/issues/905

hertzg avatar Jun 19 '24 07:06 hertzg

same problem with version 8.1.1 / RN 72

after apply fix it's works fine

killianTrm avatar Jul 02 '24 14:07 killianTrm

I was running into this issue myself when using v7.7.0 with react-native v0.72.15 and this patch resolved the issue. However, when I upgraded react-native to v0.73.9, I need to remove this patch. It looks like that is in line with the supported react-native versions according to the chart here: https://github.com/react-native-datetimepicker/datetimepicker#react-native-support.

Since this was a breaking change it really should have been released as v8.0 instead of as v7.6.3.

bradydoll avatar Jul 10 '24 21:07 bradydoll

Hello and thanks for asking, you're having this error because you're running an old version of RN. You need to install a version prior to v7.6.3 (release) Thank you 🙂

vonovak avatar Sep 30 '24 20:09 vonovak