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>
|
2023-08-02 15:35:15 +05:00
|
|
|
#import <React/RCTEventEmitter.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
|
|
|
|
|
|
2023-08-02 15:35:15 +05:00
|
|
|
@synthesize bridge = _bridge;
|
|
|
|
|
@synthesize callableJSModules = _callableJSModules;
|
|
|
|
|
|
2022-09-09 19:09:22 +05:00
|
|
|
+ (BOOL)requiresMainQueueSetup {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-02 15:35:15 +05:00
|
|
|
int rootViewTag = 0;
|
|
|
|
|
|
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;
|
2022-04-29 20:27:37 +05:00
|
|
|
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
2021-01-08 12:34:23 +05:00
|
|
|
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
|
|
|
|
moduleName:@"NotesnookShare"
|
|
|
|
|
initialProperties:nil
|
|
|
|
|
launchOptions:nil];
|
2023-08-02 15:35:15 +05:00
|
|
|
rootViewTag = rootView.tag;
|
2021-01-08 12:34:23 +05:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
2023-08-02 15:35:15 +05:00
|
|
|
|
2021-01-08 12:23:55 +05:00
|
|
|
@end
|