React-native: Error

Created on 17 Jul 2017  路  8Comments  路  Source: facebook/react-native

I am install RN through http://facebook.github.io/react-native/docs/integration-with-existing-apps.html, but it have errors.

Undefined symbols for architecture arm64:
"facebook::react::customJSCWrapper()", referenced from:
-[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in libReact.a(RCTSamplingProfilerPackagerMethod.o)
-[RCTDevSettings isJSCSamplingProfilerAvailable] in libReact.a(RCTDevSettings.o)
-[RCTDevSettings toggleJSCSamplingProfiler] in libReact.a(RCTDevSettings.o)
"facebook::react::systemJSCWrapper()", referenced from:
-[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in libReact.a(RCTSamplingProfilerPackagerMethod.o)
-[RCTDevSettings isJSCSamplingProfilerAvailable] in libReact.a(RCTDevSettings.o)
-[RCTDevSettings toggleJSCSamplingProfiler] in libReact.a(RCTDevSettings.o)
"facebook::react::parseTypeFromHeader(facebook::react::BundleHeader const&)", referenced from:
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.o)
"_JSNoBytecodeFileFormatVersion", referenced from:
+[RCTJavaScriptLoader loadBundleAtURL:onProgress:onComplete:] in libReact.a(RCTJavaScriptLoader.o)
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Locked

Most helpful comment

Adding BatchedBridge as a subspec in your Podfile resolves the issue. The tutorial at https://facebook.github.io/react-native/docs/integration-with-existing-apps.html should be updated to reflect this, as of right now there is an error.

All 8 comments

Are you using React Native with CocoaPods?

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

Followed the same tutorial, http://facebook.github.io/react-native/docs/integration-with-existing-apps.html, i.e. integrating React Native components into existing applications and receiving same error as mentioned above, see mine below:

Undefined symbols for architecture x86_64:
  "facebook::react::customJSCWrapper()", referenced from:
      -[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in libReact.a(RCTSamplingProfilerPackagerMethod.o)
      -[RCTDevSettings isJSCSamplingProfilerAvailable] in libReact.a(RCTDevSettings.o)
      -[RCTDevSettings toggleJSCSamplingProfiler] in libReact.a(RCTDevSettings.o)
  "facebook::react::systemJSCWrapper()", referenced from:
      -[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in libReact.a(RCTSamplingProfilerPackagerMethod.o)
      -[RCTDevSettings isJSCSamplingProfilerAvailable] in libReact.a(RCTDevSettings.o)
      -[RCTDevSettings toggleJSCSamplingProfiler] in libReact.a(RCTDevSettings.o)
  "facebook::react::parseTypeFromHeader(facebook::react::BundleHeader const&)", referenced from:
      +[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.o)
  "_JSNoBytecodeFileFormatVersion", referenced from:
      +[RCTJavaScriptLoader loadBundleAtURL:onProgress:onComplete:] in libReact.a(RCTJavaScriptLoader.o)
      +[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Best steps to reproduce is to follow the tutorial posted about. I am using CocoaPods with React Native as suggested in the tutorial. Any suggestions would be greatly appreciated.

Using React Native 0.46.2 and React 16.0.0-alpha.12.

Duplicate of #14925

Adding BatchedBridge as a subspec in your Podfile resolves the issue. The tutorial at https://facebook.github.io/react-native/docs/integration-with-existing-apps.html should be updated to reflect this, as of right now there is an error.

@RobertWSaunders thanks. You saved my night. :)

+1 @RobertWSaunders Thx a lot.

I've added this piece to the Docs with a PR: https://github.com/facebook/react-native-website/pull/131

No worries! Nice work getting the PR in!

Was this page helpful?
0 / 5 - 0 ratings