I'm revamping an old app written in react-native (which had no changes from ~2018) to its latest versions. I migrated from react-native 0.59 to the latest 0.64
To do so, I got help from the react-native migration help tool.
I also had to update my dependencies to work with auto-link and cocoa pods. I'm fairly new to mobile and react native (my background is on web with plain react), so there might be something obvious that I'm missing.
But, while android compiles and works successfully on my Mac, I can't make the compilation to work with iOS.
As the title says, I'm getting the following error:
Undefined symbols for architecture x86_64: "_RCTSetLogFunction", referenced from: -[MetronomeWalletTests testRendersWelcomeScreen] in MetronomeWalletTests.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is happening in the test project, not in the main project (or however it is called).
Things I've tried
- I enabled dead code stripping as this issue suggests in both the main and the test project, for debug and release, in the "targets" section.
- I also tried disabling that same setting, as this issue suggests
- I tried cleaning and rebuilding
- I tried adding
Javascript.frameworkto the linked libraries
If I understand correctly, this error takes place in the phase "Link {projectName}Tests (x86_64)"
None of these have worked. I've run out of ideas.
Environment:
- Mac pro with Big Sur 11.3.1 (I'm also new to Mac in general, so let me know if anything might be missing)
- RN version:
0.64.2 - Xcode version:
12.5.1
I get this error building both from the console and from xcode