react-native-share-menu
react-native-share-menu copied to clipboard
Custom Share Extension is not working in react native 0.61.5
Custom share extension view is blank in react-native 0.61.5
Please let me know how I can solve this problem.
Can you show the contents of index.share.js
file ??
Hi, @ikmrgrv This is original file in exmaple project.
Ok. Anything in logs ?? any error or warning ??
Also, I followed the same instructions and I could get it working fine !
I have the same issue here. I just copied the example of Share.js and index.share.js
No error or warning.
react-native: 0.61.5 react-native-share-menu: 5.0.3
same issue here:
react-native: 0.61.5 react-native-share-menu: 5.0.3
Ok. Anything in logs ?? any error or warning ??
Also, I followed the same instructions and I could get it working fine !
I got it working for me.
The problem was, in the build phase with Release scheme, it was not pointing to index.share.js
properly.
Hence, though it was working for me in the simulator, it wasn't working properly in real device.
Fortunately, it's working for me now!
@ikmrgrv Could you point out what was wrong with the path to your index.share.js
file?
export ENTRY_FILE=index.share.js
Same problem here, debug build works but release cannot load the bundle when custom view is used. @ikmrgrv Can you remember what you changed to allow the index.share.js bundle to be loaded? The build process seems to work fine and bundles my index.share.js to a file called main.jsbundle, it just doesn't seem to be able to load it in the ReactShareViewController.swift
swift file when it does:
return Bundle.main.url(forResource: "main", withExtension: "jsbundle")
The error I see in the iphone logs for my share extension app is
Terminating app due to uncaught exception 'RCTFatalException: Could not get BatchedBridge, make sure your bundle is packaged correctly', reason: 'Could not get BatchedBridge, make sure your bundle is packaged correctly'
I have a hunch it's something to do with the main app also being bundled as main.jsbundle but I don't really know much about how the process it supposed to work. I guess it's time to try and understand a bit more about swift and what's going on! 🤷