2021-01-08 12:34:23 +05:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
#import <ReactNativeShareExtension.h>
|
|
|
|
|
#import <React/RCTBundleURLProvider.h>
|
|
|
|
|
#import <React/RCTRootView.h>
|
|
|
|
|
#import <React/RCTLog.h>
|
2021-01-08 12:23:55 +05:00
|
|
|
|
2021-01-08 12:34:23 +05:00
|
|
|
@interface ShareViewController : ReactNativeShareExtension
|
2021-01-08 12:23:55 +05:00
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
@implementation ShareViewController
|
|
|
|
|
|
2021-01-08 12:34:23 +05:00
|
|
|
RCT_EXPORT_MODULE();
|
2021-01-08 12:23:55 +05:00
|
|
|
|
2021-01-08 12:34:23 +05:00
|
|
|
- (UIView*) shareView {
|
|
|
|
|
NSURL *jsCodeLocation;
|
|
|
|
|
|
|
|
|
|
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
|
|
|
|
|
|
|
|
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
|
|
|
|
moduleName:@"NotesnookShare"
|
|
|
|
|
initialProperties:nil
|
|
|
|
|
launchOptions:nil];
|
|
|
|
|
rootView.window.backgroundColor =[UIColor clearColor];
|
|
|
|
|
rootView.layer.shadowOpacity = 0;
|
|
|
|
|
rootView.backgroundColor = [UIColor clearColor];
|
|
|
|
|
|
|
|
|
|
// Uncomment for console output in Xcode console for release mode on device:
|
|
|
|
|
// RCTSetLogThreshold(RCTLogLevelInfo - 1);
|
2021-01-08 12:23:55 +05:00
|
|
|
|
2021-01-08 12:34:23 +05:00
|
|
|
return rootView;
|
2021-01-08 12:23:55 +05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|