Sentry-react-native: iOS: Apple Mach-O Linker Error

Created on 13 Jun 2017  Â·  4Comments  Â·  Source: getsentry/sentry-react-native

I'm trying to upgrade from RNSentry 0.9.1 to 0.12.10. After a yarn upgrade, I unlinked and re-linked react-native-sentry. The iOS Debug build works fine.

However, if I'm trying to build the iOS Release, I get the following error:

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RNSentry", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is it a problem with Sentry, or is something wrong with my project – did I miss something? I'm on react-native 0.42.3.

Thanks in advance!

Most helpful comment

Make sure the library is linked in build phases.

All 4 comments

Also some extra information: I'm trying to build the release through Xcode to the Simulator (iPhone 6), which you may notice due to the architecture x86_64 in the error message.

Make sure the library is linked in build phases.

Ugh, sorry. Yep, that was the problem. I have two build targets, but it only got added to one. That's why I've missed that.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings