Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible function pointer types passing YGNodeConstRef #911

Closed
hertzg opened this issue Jun 19, 2024 · 3 comments
Closed

incompatible function pointer types passing YGNodeConstRef #911

hertzg opened this issue Jun 19, 2024 · 3 comments

Comments

@hertzg
Copy link

hertzg commented Jun 19, 2024

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 #905

@killianTrm
Copy link

same problem with version 8.1.1 / RN 72

after apply fix it's works fine

@bradydoll
Copy link

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.

@vonovak
Copy link
Member

vonovak commented Sep 30, 2024

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 🙂

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

No branches or pull requests

4 participants