From 4f49271c284779870cfebfce00136c3d100edaa0 Mon Sep 17 00:00:00 2001 From: John Wu Date: Mon, 30 Mar 2015 22:24:40 +0800 Subject: [PATCH] Update NativeModulesIOS.md --- docs/NativeModulesIOS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/NativeModulesIOS.md b/docs/NativeModulesIOS.md index 32572afb1..5fc40a534 100644 --- a/docs/NativeModulesIOS.md +++ b/docs/NativeModulesIOS.md @@ -178,6 +178,11 @@ The native module can signal events to JavaScript without being invoked directly ```objective-c #import "RCTBridge.h" +#import "RCTEventDispatcher.h" + +@implementation CalendarManager + +@synthesize bridge = _bridge; - (void)calendarEventReminderReceived:(NSNotification *)notification { @@ -185,6 +190,8 @@ The native module can signal events to JavaScript without being invoked directly [self.bridge.eventDispatcher sendAppEventWithName:@"EventReminder" body:@{@"name": eventName}]; } + +@end ``` JavaScript code can subscribe to these events: