alinz / react-native-share-extension

react-native as an engine to drive share extension
MIT License
766 stars 401 forks source link

Issue on React Native 0.60.0 #189

Closed theyogendraDanwar closed 4 years ago

theyogendraDanwar commented 5 years ago

I am facing this issue for a while can anybody help me out in this one. Don't know how to proceed after this

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTRootView", referenced from:
      objc-class-ref in MyShareEx.o
  "_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
      objc-class-ref in MyShareEx.o
  "_RCTRegisterModule", referenced from:
      +[MyShareEx load] in MyShareEx.o
      +[ReactNativeShareExtension load] in libReactNativeShareExtension.a(ReactNativeShareExtension.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
eladni101 commented 5 years ago

https://github.com/RocketChat/rn-extensions-share I use this library. Here What I did and this compile to me.

https://github.com/alinz/react-native-share-extension/issues/190

Meandmybadself commented 5 years ago

@theyogendraDanwar - this worked for me in resolving the issue: https://github.com/alinz/react-native-share-extension/issues/182#issuecomment-552941766

theyogendraDanwar commented 5 years ago

@eladni101 @Meandmybadself I tried the above solution but now I am stuck with two errors

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_RCTSRWebSocket", referenced from:
      objc-class-ref in libReact.a(RCTInspectorPackagerConnection.o)
  "_OBJC_CLASS_$_RCTReconnectingWebSocket", referenced from:
      objc-class-ref in libReact.a(RCTPackagerConnection.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

in the Share Extension Build phases section React Dependency is added and in Link Binary with Libraries section these libraries are linked:

Screenshot 2019-11-29 at 12 07 58 PM
theyogendraDanwar commented 5 years ago

Update: Thanks @eladni101 @Meandmybadself now the extension is built successfully turns out I just needed to add the RCTWebsocket in the Libraries section the Project Navigator.