mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-10 06:15:49 +00:00
d7f80e22c8
We had to shift to using an event-based architecture to communicate with the page from native code.
26 lines
598 B
Objective-C
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
|