alinz / react-native-share-extension

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

Class won't launch react-native view #31

Closed makepanic closed 7 years ago

makepanic commented 7 years ago

Hi there, great project.

I've added it to a react-native project and it works without issues on android. Trying to use it in the iOS part, I have some issues starting the shared component.

The rootView gets inserted and i can change its background color, but it won't launch the react-native view.

I tried to reduce my index.ios.js to use a minimal <View> with some style, but nothing gets called inside the js module.

The xcode output complains that No bundle URL present. Does anyone have any suggestions on what i could do to fix this issue? The project is using latest versions of react-native and this addon.

Full log ``` 2017-04-04 13:11:19.191 [info][tid:main][RCTBatchedBridge.m:72] Initializing (parent: , executor: RCTJSCExecutor) 2017-04-04 13:11:19.196066 freiraumShare[5143:2801405] Initializing (parent: , executor: RCTJSCExecutor) 2017-04-04 13:11:19.197 [warn][tid:main][RCTBatchedBridge.m:110] Failed to load source: Error Domain=RCTErrorDomain Code=0 "No bundle URL present. Make sure you're running a packager server or have included a .jsbundle file in your application bundle." UserInfo={NSLocalizedDescription=No bundle URL present. Make sure you're running a packager server or have included a .jsbundle file in your application bundle.} 2017-04-04 13:11:19.196755 freiraumShare[5143:2801405] Failed to load source: Error Domain=RCTErrorDomain Code=0 "No bundle URL present. Make sure you're running a packager server or have included a .jsbundle file in your application bundle." UserInfo={NSLocalizedDescription=No bundle URL present. Make sure you're running a packager server or have included a .jsbundle file in your application bundle.} ```
alinz commented 7 years ago

Can you run the provided example?

makepanic commented 7 years ago

After trying to configure the project again it works without issues.

I guess something went wrong while doing the xCode setup.

andyesp commented 7 years ago

@makepanic whay exactly did you do? I'm facing the same problem...

alinz commented 7 years ago

@andyesp have you run the the provided example? If the example works, then you must have missed a step.

andyesp commented 7 years ago

@alinz It's working on iOS debug, but it isn't woking in the build release. I think it's a configuration problem, but I've already tried a lot of possible solutions with no success.

The errors in the device logs are:

Terminating app due to uncaught exception 'RCTFatalException: No bundle URL present.

Unable to bootstrap_look_up port with name net.taringa.app.share.gsEvents: unknown error code (1102)

Failed to load remote view controller with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named net.taringa.app.share.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service named net.taringa.app.share.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid..

It's working on Android (debug and release builds).

andyesp commented 7 years ago

@alinz Sorry, It's working on the iOS simulator but not in real iOS devices.

I've already added the run script phase in the extension that is mentioned in the readme.