react-native-pdf
react-native-pdf copied to clipboard
'react/utils/ContextContainer.h' file not found
What react-native version are you using?
0.72.3
What react-native-pdf version are you using?
6.7.1
What platform does your issue occur on? (android/ios/both) Ios
Describe your issue as precisely as possible :
-
Steps to reproduce the issue or to explain in which case you get the issue While trying to run/build app this error hapens
-
Interesting
logs
Compiling react-native-pdf Pods/react-native-pdf » react-native-pdf-dummy.m
› Compiling react-native-pdf Pods/react-native-pdf » react_native_pdf_vers.c
› Compiling react-native-pdf Pods/react-native-pdf » RNPDFPdfViewManager.mm
❌ (/Users/ncsistemas/Library/Developer/Xcode/DerivedData/rheconheceDev-bbimnupsfouiuufhfjykyqeolvje/Build/Products/Debug-iphoneos/React-Fabric/React_Fabric.framework/Headers/react/renderer/core/PropsParserContext.h:11:10)
9 |
10 | #include <react/renderer/core/ReactPrimitives.h>
> 11 | #include <react/utils/ContextContainer.h>
| ^ 'react/utils/ContextContainer.h' file not found
12 |
13 | namespace facebook {
14 | namespace react {
› Compiling react-native-pdf Pods/react-native-pdf » RNPDFPdfView.mm
I've found something that might be the sollution here
I used patch-package to [email protected] and it works.
Here is the diff that solved this Isuue:
diff --git a/node_modules/react-native-pdf/react-native-pdf.podspec b/node_modules/react-native-pdf/react-native-pdf.podspec
index fb36140..dcf284e 100644
--- a/node_modules/react-native-pdf/react-native-pdf.podspec
+++ b/node_modules/react-native-pdf/react-native-pdf.podspec
@@ -17,24 +17,17 @@ Pod::Spec.new do |s|
s.framework = "PDFKit"
if fabric_enabled
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
-
- s.pod_target_xcconfig = {
- 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/boost" "$(PODS_ROOT)/boost-for-react-native" "$(PODS_ROOT)/RCT-Folly"',
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
- }
s.platforms = { ios: '11.0', tvos: '11.0' }
- s.compiler_flags = folly_compiler_flags + ' -DRCT_NEW_ARCH_ENABLED'
s.source_files = 'ios/**/*.{h,m,mm,cpp}'
- s.requires_arc = true
- s.dependency "React"
- s.dependency "React-RCTFabric"
- s.dependency "React-Codegen"
- s.dependency "RCT-Folly"
- s.dependency "RCTRequired"
- s.dependency "RCTTypeSafety"
- s.dependency "ReactCommon/turbomodule/core"
+ install_modules_dependencies(s);
else