#import "RNNEventEmitter.h" #import "RNN.h" @implementation RNNEventEmitter RCT_EXPORT_MODULE(); static NSString* const onAppLaunched = @"RNN.appLaunched"; static NSString* const containerStart = @"RNN.containerStart"; static NSString* const containerStop = @"RNN.containerStop"; -(NSArray *)supportedEvents { return @[onAppLaunched, containerStart, containerStop]; } # pragma mark public -(void)sendOnAppLaunched { [self send:onAppLaunched body:nil]; } -(void)sendContainerStart:(NSString *)containerId { [self send:containerStart body:containerId]; } -(void)sendContainerStop:(NSString *)containerId { [self send:containerStop body:containerId]; } # pragma mark private -(void)send:(NSString *)eventName body:(id)body { [[RNN.instance.bridge moduleForClass:[RNNEventEmitter class]] sendEventWithName:eventName body:body]; } @end