mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-02 09:46:28 +00:00
support latest version
This commit is contained in:
parent
935b72bdac
commit
283826e687
@ -14,8 +14,8 @@ extern "C" {
|
||||
#import <GCDWebServers/GCDWebServers.h>
|
||||
#endif
|
||||
|
||||
@interface NSObject (RCTJavaScriptContext)
|
||||
- (instancetype)initWithJSContext:(JSGlobalContextRef)context;
|
||||
@interface NSObject ()
|
||||
- (instancetype)initWithJSContext:(JSContext *)context NS_DESIGNATED_INITIALIZER;
|
||||
- (JSGlobalContextRef)ctx;
|
||||
@end
|
||||
|
||||
@ -29,8 +29,9 @@ JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool cre
|
||||
if (!rctJSContext && create) {
|
||||
Class RCTJavaScriptContext = NSClassFromString(@"RCTJavaScriptContext");
|
||||
if (RCTJavaScriptContext) {
|
||||
JSGlobalContextRef ctx = JSGlobalContextCreate(NULL);
|
||||
rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:ctx];
|
||||
JSContext *context = [[JSContext alloc] init];
|
||||
//JSGlobalContextRef ctx = JSGlobalContextCreate(NULL);
|
||||
rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:context];
|
||||
object_setIvar(executor, contextIvar, rctJSContext);
|
||||
}
|
||||
else {
|
||||
|
@ -6,7 +6,7 @@
|
||||
"start": "node_modules/react-native/packager/packager.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-native": "0.13.2",
|
||||
"react-native": "0.14.2",
|
||||
"realm": "file:../../lib",
|
||||
"realm-tests": "file:.."
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user