react-native-reanimated: 2.0.0 stable build error on iOS - `hidden_headers/Logger.h` not found
Description
Upgrading from 2.0.0-rc.3
to 2.0.0
produces an error when building for iOS, 2.0.0-rc.3
is working without issue.
[12:46:26]: ▸ Linking React
[12:46:26]: ▸ Compiling WorkletsCache.cpp
[12:46:26]: ▸ Compiling WorkletEventHandler.cpp
[12:46:26]: ▸ Compiling UIResponder+Reanimated.mm
[12:46:26]: ▸ Compiling ShareableValue.cpp
[12:46:26]: ▸ Compiling Scheduler.cpp
[12:46:26]: ▸ Compiling RuntimeDecorator.cpp
[12:46:26]: ▸ ❌ /Users/levi/src/project/native/node_modules/react-native-reanimated/Common/cpp/headers/Tools/ReanimatedHiddenHeaders.h:10:14: '../../hidden_headers/Logger.h' file not found
[12:46:26]: ▸ #include "../../hidden_headers/Logger.h"
[12:46:26]: ▸ ^
This appears to be related to #1775 however I haven’t been able to find any reports of others facing the same issue and beleive that it’s likely related to something specific in our brownfield app, but haven’t been able to find a way to solve it in userland.
I’m not sure this is necessarily a bug, but any pointers on resolving it would be incredibly helpful.
Screenshots
Steps To Reproduce
I’m trying to put together a minimal reproduction, but our app is quite large closed source, so I haven’t been able to extract a reproduction yet. At this stage I’m looking for tips/suggestions.
Expected behavior
App builds.
Actual behavior
App build fails. 😅
Snack or minimal code example
TBD
Package versions
- React: 16.13.1
- React Native: 0.63.4
- React Native Reanimated: 2.0.0
- NodeJS: 15.3.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 18 (14 by maintainers)
Commits related to this issue
- :tada: Repro https://github.com/software-mansion/react-native-reanimated/issues/1805 — committed to mrbrentkelly/reanimated2-logger-not-found by mrbrentkelly 3 years ago
- fix headers for use_frameworks! projects (#1810) ## Description Fixes #1805 Reanimated **v2.0.0** was causing compile errors in React Native iOS projects who used `use_frameworks!` in their Podfi... — committed to software-mansion/react-native-reanimated by mrbrentkelly 3 years ago
Dug into this a bit more this morning and changing the paths slightly in
ReanimatedHiddenHeaders.h
allows a project that usesuse_frameworks!
to compile.Raised a PR with this suggested change https://github.com/software-mansion/react-native-reanimated/pull/1810
Hi guys, @piaskowyk I have same issue. can not build.
Awesome! 🎉 Thanks all for your commitment and help!
@karo-dc I’m working on a solution now.
Yes, we moved these header files to another location. Did you run
pod install
again after the update? Sorry if it is obviously for you. At first, You can try something like this:If this doesn’t help, I’ll investigate this problem.
Nice @karo-dc 👍 I’ve been using something similar as a workaround as well. Feels like a workaround though rather than a true solution… I remember React Native going through something similar a while ago when use_frameworks was causing issues. I believe this is the PR that fixed that https://github.com/facebook/react-native/pull/12089
Perhaps reanimated could do something similar with header search paths in its podspec to work for projects that use the use_frameworks flag?
I’m also hitting this. It appears the issue is related to using
use_frameworks!
in your Podfile:Repro steps:
ReanimatedHeaderIssue/ios/Podfile
and adduse_frameworks!
npx pod-install
ios/ReanimatedHeaderIssue.xcworkspace
and run the projectSome ideas to try: https://stackoverflow.com/questions/5198905/h-file-not-found https://stackoverflow.com/questions/33691707/xcode-cant-find-header-file
BTW, do you use Swift by any chance?
EDIT: since you use Swift I’ll add one more link that maybe is relevant: https://developer.apple.com/forums/thread/69606?answerId=283546022#283546022