realm-js/react-native/RealmReact.h
Scott Kyle d7f80e22c8 Update React Tests to support React Native 0.18
We had to shift to using an event-based architecture to communicate with the page from native code.
2016-01-07 14:31:04 -08:00

26 lines
598 B
Objective-C

/* Copyright 2015 Realm Inc - All Rights Reserved
* Proprietary and Confidential
*/
#import <Foundation/Foundation.h>
#import <JavaScriptCore/JavaScriptCore.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef void (^RealmReactEventHandler)(id message);
JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool create);
@interface RealmReact : NSObject
- (void)addListenerForEvent:(NSString *)eventName handler:(RealmReactEventHandler)handler;
- (void)removeListenerForEvent:(NSString *)eventName handler:(RealmReactEventHandler)handler;
@end
#ifdef __cplusplus
}
#endif