Closed ketanvault closed 4 years ago
same case in here
@alinz Please try to reply ASAP. I have to resolve this as it is required urgently.
Hey @alinz, I have the same problem. Please try to fix this ASAP.
Hey @alinz, are you going to reply this ? I'm stuck at a point or else please suggest me another package.
Hey @alinz, are you going to reply this ? I'm stuck at a point or else please suggest me another package.
https://github.com/ajith-ab/react-native-file-share-intent try this one.
@jeffelector is it doing all the sharing operations like sharing links, text, photos & videos ?
Adds the application to the share intent of the device, so it can be launched from other apps and receive data from them
this is from the documentation ..for me it work just fine i manage to pass string ,but for photo i am not sure.. i know it can be pass as uri to the photo and then you can make something with it .
@jeffelector Thanks for the information.
Hello any updates on this? My share extension is not working after upgrading to 0.60.5. It runs fine on android but does not work in iOS
Hello any updates on this? My share extension is not working after upgrading to 0.60.5. It runs fine on android but does not work in iOS
I also get this issue it not working in 0.60.5^ for iOS I got this error --> 'React/RCTBridge.h' file not found
Hey @tarang8811 & @AkshayP8140 Please add the libraries which are specified in documentation using add libraries to your Share Extension project. This library is not a pod specific. So have to add/link the libraries. Please read the document clearly about how to add libraries. I have done it in my project which is on React 0.60.5.
@kumbhar-ketan I make my project with this step https://github.com/alinz/react-native-share-extension/issues/182#issuecomment-534993812
so, After perform all that step I can run the project or extension but I not get my main page when I click on the extension
@AkshayP8140 Can you post your maindelegate file which you are using in share extension. Also post a share component which you are using to display UI on clicking of the share extension.
@AkshayP8140 Can you post your maindelegate file which you are using in share extension. Also post a share component which you are using to display UI on clicking of the share extension.
MyShareEx.m
#import <Foundation/Foundation.h>
#import "ReactNativeShareExtension.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLog.h>
@interface MyShareEx : ReactNativeShareExtension
@end
@implementation MyShareEx
RCT_EXPORT_MODULE();
- (UIView*) shareView {
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"MyShareEx"
initialProperties:nil
launchOptions:nil];
rootView.backgroundColor = nil;
// Uncomment for console output in Xcode console for release mode on device:
// RCTSetLogThreshold(RCTLogLevelInfo - 1);
return rootView;
}
@end
index.js
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import Share_file from './Components/Share';
AppRegistry.registerComponent(appName, () => App);
AppRegistry.registerComponent('MyShareEx', () => Share_file);
@AkshayP8140 this is wrong. You can't open same intent twice. You must change the default entry file of your share extension to other file. Like In MyShareX.m file replace index by your js filename. In your case it is './Components/Share'
@kumbhar-ketan like this
import {AppRegistry} from 'react-native';
import Share_file from './Components/Share';
AppRegistry.registerComponent('MyShareEx', () => Share_file);
No. You must register it in index js but you must set the entry point which you used to register it. Ex. import {AppRegistry} from 'react-native'; import App from './App'; import {name as appName} from './app.json'; import Share_file from './Share';
AppRegistry.registerComponent(appName, () => App); AppRegistry.registerComponent('MyShareEx', () => Share_file);
Now change in your MyShareX.m file - @'index' => @'Share'
@kumbhar-ketan I change but not working
https://github.com/alinz/react-native-share-extension/issues/180#issuecomment-544832872 This is working in emulator but it not work in the device
I think it because of bundler issues When I Run in Device In Xcode give this type pf console when I click on Extention
"Make sure you're running a packager server or have included a .jsbundle file in your application bundle."
i ve used this package with all new features with react native greater than 0.60 support react-native-receive-sharing-intent
@ajith-ab react-native-share-extension It works on latest react-native 0.62.2 version though. so I don't think I need what you suggest in every ticket of this package.
Not working with React Native 0.60.5. Followed each & every step as there in the docs. Please help me to resolve this.