wonday / react-native-pdf

A <Pdf /> component for react-native
MIT License
1.6k stars 557 forks source link

iOS: 'yoga/style/Style.h' Not Found with New Architecture Enabled #807

Open Rodrigo816 opened 10 months ago

Rodrigo816 commented 10 months ago

What react-native version are you using? 0.73.2

What react-native-pdf version are you using? 6.7.4

What platform does your issue occur on? iOS

Describe your issue as precisely as possible : 1) Enable RCT_NEW_ARCH_ENABLED=1 to use the new React Native architecture (fabric). 2) Compile the project in XCode. 3) The compilation fails with the error: 'yoga/style/Style.h' file not found.

image (14)

Gu1K commented 9 months ago

same error

psquizzle commented 8 months ago

Same ❌ (ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/YogaStylableProps.h:10:10)

8 | #pragma once 9 |

10 | #include <yoga/style/Style.h> | ^ 'yoga/style/Style.h' file not found 11 | 12 | #include <react/renderer/core/Props.h> 13 | #include <react/renderer/core/PropsParserContext.h>

[RUN_FASTLANE] › Compiling react-native-pdf Pods/react-native-pdf » RNPDFPdfView.mm [RUN_FASTLANE] ❌ (ios/Pods/Headers/Public/React-Fabric/react/renderer/components/view/YogaStylableProps.h:10:10)

8 | #pragma once 9 |

10 | #include <yoga/style/Style.h> | ^ 'yoga/style/Style.h' file not found 11 | 12 | #include <react/renderer/core/Props.h> 13 | #include <react/renderer/core/PropsParserContext.h>

psquizzle commented 8 months ago

This is fixed in https://github.com/wonday/react-native-pdf/pull/803 or alternatively add "${PODS_ROOT}/Headers/Private/Yoga" in the podspec file.