'react/bridging/CallbackWrapper.h' file not found
Amurmurmur opened this issue · comments
Amur commented
Started getting this error when using: useFrameworks: "static"
I have to use a static option because of the react-native-firebase, when setting this to a default value, it compiles just fine.
I've noticed there was a similar issue with vision-camera mrousavy/react-native-vision-camera#1121
this is my expo-build-properties config:
[
"expo-build-properties",
{
"ios": {
"deploymentTarget": "14.0",
"useFrameworks": "static"
},
"android": {
"compileSdkVersion": 34,
"targetSdkVersion": 34,
"packagingOptions": {
"pickFirst": [
"lib/x86/libcrypto.so",
"lib/x86_64/libcrypto.so",
"lib/armeabi-v7a/libcrypto.so",
"lib/arm64-v8a/libcrypto.so"
]
}
}
}
],
Here is a build log:
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » fastpbkdf2.c
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » QuickCryptoModule.mm
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLVerifyInstaller.cpp
❌ (/Users/amurmurmur/Library/Developer/Xcode/DerivedData/myapp-elnyunxmjmekjxddvyzgrvtpsfvv/Build/Products/Debug-iphonesimulator/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core/ReactCommon/CallbackWrapper.h:11:10)
9 |
10 | // This header is left here for compatibility reasons.
> 11 | #include <react/bridging/CallbackWrapper.h>
| ^ 'react/bridging/CallbackWrapper.h' file not found
12 |
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLUtils.cpp
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLTypedArray.cpp
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLThreadAwareHostObject.cpp
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLSmartHostObject.cpp
❌ (/Users/amurmurmur/Library/Developer/Xcode/DerivedData/myapp-elnyunxmjmekjxddvyzgrvtpsfvv/Build/Products/Debug-iphonesimulator/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core/ReactCommon/CallbackWrapper.h:11:10)
9 |
10 | // This header is left here for compatibility reasons.
> 11 | #include <react/bridging/CallbackWrapper.h>
| ^ 'react/bridging/CallbackWrapper.h' file not found
12 |
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLSignInstaller.cpp
❌ (/Users/amurmurmur/Library/Developer/Xcode/DerivedData/myapp-elnyunxmjmekjxddvyzgrvtpsfvv/Build/Products/Debug-iphonesimulator/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core/ReactCommon/CallbackWrapper.h:11:10)
9 |
10 | // This header is left here for compatibility reasons.
> 11 | #include <react/bridging/CallbackWrapper.h>
| ^ 'react/bridging/CallbackWrapper.h' file not found
12 |
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLSignHostObjects.cpp
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLRsa.cpp
› Compiling react-native-quick-crypto Pods/react-native-quick-crypto » MGLRandomHostObject.cpp
Amur commented
This patch file fixes it.
It only needed preserve_paths in the podfile to be uncommented for this issue to get resolved
diff --git a/node_modules/react-native-quick-crypto/react-native-quick-crypto.podspec b/node_modules/react-native-quick-crypto/react-native-quick-crypto.podspec
index 31a98d9..180b071 100644
--- a/node_modules/react-native-quick-crypto/react-native-quick-crypto.podspec
+++ b/node_modules/react-native-quick-crypto/react-native-quick-crypto.podspec
@@ -23,10 +23,10 @@ Pod::Spec.new do |s|
# Any private headers that are not globally unique should be mentioned here.
# Otherwise there will be a nameclash, since CocoaPods flattens out any header directories
# See https://github.com/firebase/firebase-ios-sdk/issues/4035 for more details.
- # s.preserve_paths = [
- # 'ios/**/*.h',
- # 'cpp/**/*.h'
- # ]
+ s.preserve_paths = [
+ 'ios/**/*.h',
+ 'cpp/**/*.h'
+ ]
s.pod_target_xcconfig = {
"USE_HEADERMAP" => "YES",
@@ -37,8 +37,9 @@ Pod::Spec.new do |s|
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\""
}
s.dependency "React-Core"
s.dependency "React"
s.dependency "React-callinvoker"
+ s.dependency "ReactCommon"
end
\ No newline at end of file