// // NixShareExtension.m // NixShareExtension // // Created by Haroon Shahid on 30/4/2018. // Copyright © 2018 Facebook. All rights reserved. // #import #import "ReactNativeShareExtension.h" #import #import #import #import #import #import #import //#import "ReactNativeShareExtension.h" @interface NixShareExtension : ReactNativeShareExtension @end @implementation NixShareExtension RCT_EXPORT_MODULE(); + (BOOL)requiresMainQueueSetup { return YES; } - (UIView*) shareView { NSURL *jsCodeLocation; #ifdef DEBUG // jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; #else jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; #endif RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"NixShareExtension" initialProperties:nil launchOptions:nil]; rootView.backgroundColor = nil; return rootView; } @end