Description
iOS build fails with header not found error when using react-native-godot v1.0.1 with react-native-worklets-core v1.6.2.
Error
❌ (node_modules/@borndotcom/react-native-godot/common/NativeGodotModule.cpp:44:10)
42 | #endif
43 |
> 44 | #include <react-native-worklets-core/WKTJsiWorklet.h>
| ^ 'react-native-worklets-core/WKTJsiWorklet.h' file not found
45 | #include <react-native-worklets-core/WKTJsiWorkletContext.h>
Root Cause
The include statement expects headers at <react-native-worklets-core/WKTJsiWorklet.h>, but in react-native-worklets-core v1.6.2, the headers are located at cpp/WKTJsiWorklet.h.
The react-native-worklets-core podspec uses:
s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}"
This doesn't create a header mapping that would expose the headers under react-native-worklets-core/ prefix.
Environment
- react-native-godot: 1.0.1
- react-native-worklets-core: 1.6.2
- react-native: 0.81.5
- Expo SDK: 54
- Platform: iOS
- CocoaPods: 1.16.2
Suggested Fix
Either:
- Update the podspec to add proper
HEADER_SEARCH_PATHS configuration pointing to $(PODS_ROOT)/../node_modules/react-native-worklets-core/cpp with the include changed to just <WKTJsiWorklet.h>
- Or add a dependency declaration with header search path in the podspec:
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/../node_modules/react-native-worklets-core\""
}
And create symlinks or adjust include paths accordingly.
Steps to Reproduce
- Create a new Expo/React Native project
- Install @borndotcom/react-native-godot
- Run
npx expo run:ios
- Build fails with the header not found error
Description
iOS build fails with header not found error when using react-native-godot v1.0.1 with react-native-worklets-core v1.6.2.
Error
Root Cause
The include statement expects headers at
<react-native-worklets-core/WKTJsiWorklet.h>, but in react-native-worklets-core v1.6.2, the headers are located atcpp/WKTJsiWorklet.h.The react-native-worklets-core podspec uses:
This doesn't create a header mapping that would expose the headers under
react-native-worklets-core/prefix.Environment
Suggested Fix
Either:
HEADER_SEARCH_PATHSconfiguration pointing to$(PODS_ROOT)/../node_modules/react-native-worklets-core/cppwith the include changed to just<WKTJsiWorklet.h>And create symlinks or adjust include paths accordingly.
Steps to Reproduce
npx expo run:ios