I am trying to get realm running in a react-native project.
I expect react-native link to work, or when you manually link the build to pass.
On React-native you get the missing realm constructor.
After checking with react-native link realm, this is the output:
Scanning 521 folders for symlinks in /Users/techwolf12/Documents/React/kerckebosch-energieplein/node_modules (5ms)
When manually adding the project and linking the binary, this is the xcode build result:
Apple Mach-O Linker Error Group
"_deflate", referenced from:
"_deflateBound", referenced from:
"_deflateEnd", referenced from:
"_deflateInit2_", referenced from:
"_deflateInit_", referenced from:
"_inflate", referenced from:
"_inflateEnd", referenced from:
"_inflateInit2_", referenced from:
"_inflateInit_", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Not relevant, I can provide devs with a project.
You need to add libz to the XCode Project:
Build Phases > Link Binary with Libraries > add libz.tbd
This solved my problem! No where to find in the documentation, I needed to link it manually and also add libz.tbd (from iOS itself) to be able to run this. Thanks a lot @MrStofkat !
Yes, they somehow forget to mention this step entirely in the documentation.
Probably because you need to run react-native link realm which would handle this for you, however this wouldn't in my case
Most helpful comment
This solved my problem! No where to find in the documentation, I needed to link it manually and also add libz.tbd (from iOS itself) to be able to run this. Thanks a lot @MrStofkat !