Files
notesnook/apps/mobile/native/ios/Make Note/ShareViewController.m

44 lines
1.2 KiB
Mathematica
Raw Permalink Normal View History

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>
#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
@synthesize bridge = _bridge;
@synthesize callableJSModules = _callableJSModules;
+ (BOOL)requiresMainQueueSetup {
return true;
}
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];
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
}
2021-01-08 12:23:55 +05:00
@end