Skip to content

Instantly share code, notes, and snippets.

@littleV
Created March 22, 2019 22:36
Show Gist options
  • Save littleV/a0f608e5c7410088c6e02a3980a96f1c to your computer and use it in GitHub Desktop.
Save littleV/a0f608e5c7410088c6e02a3980a96f1c to your computer and use it in GitHub Desktop.
#import "UnifiedSDK.h"
#import <React/RCTBridge.h>
static RCTBridge * bridge;
@implementation UnifiedSDK
+ (void)setup
{
NSBundle *bundle = [NSBundle bundleForClass: [UnifiedSDK class]];
NSURL *jsCodeLocation = [bundle URLForResource:@"unifiedsdk" withExtension:@"bundle"];
bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
moduleProvider:nil
launchOptions:nil];
}
+ (void)helloWorld
{
[bridge enqueueJSCall:@"CommonInterface" method:@"helloworld" args:@[@"From UnifiedSDK js"] completion:nil];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment