Merge pull request #556 from realm/al-rn-31

Fixes for RN 0.31.0
This commit is contained in:
Ari Lazier 2016-08-08 11:54:29 -07:00 committed by GitHub
commit 53f223a403
3 changed files with 6 additions and 4 deletions

View File

@ -7,7 +7,7 @@
}, },
"dependencies": { "dependencies": {
"react": "~15.2.0", "react": "~15.2.0",
"react-native": "^0.29.0", "react-native": "^0.31.0",
"realm": "file:../.." "realm": "file:../.."
} }
} }

View File

@ -19,11 +19,13 @@
#import "RealmReact.h" #import "RealmReact.h"
#import "RealmAnalytics.h" #import "RealmAnalytics.h"
#import "RCTBridge.h" #import "RCTBridge.h"
#import "RCTJavaScriptExecutor.h"
#import "jsc_init.h" #import "jsc_init.h"
#import "shared_realm.hpp" #import "shared_realm.hpp"
#import "realm_coordinator.hpp" #import "realm_coordinator.hpp"
#import <objc/runtime.h>
#import <arpa/inet.h> #import <arpa/inet.h>
#import <ifaddrs.h> #import <ifaddrs.h>
#import <netdb.h> #import <netdb.h>
@ -44,7 +46,7 @@ using namespace realm::rpc;
@interface NSObject () @interface NSObject ()
- (instancetype)initWithJSContext:(JSContext *)context; - (instancetype)initWithJSContext:(JSContext *)context;
- (instancetype)initWithJSContext:(JSContext *)context onThread:(NSThread *)thread; - (instancetype)initWithJSContext:(JSContext *)context onThread:(NSThread *)thread;
- (JSGlobalContextRef)ctx; - (JSContext *)context;
@end @end
extern "C" JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool create) { extern "C" JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executor, bool create) {
@ -69,7 +71,7 @@ extern "C" JSGlobalContextRef RealmReactGetJSGlobalContextForExecutor(id executo
object_setIvar(executor, contextIvar, rctJSContext); object_setIvar(executor, contextIvar, rctJSContext);
} }
return [rctJSContext ctx]; return [rctJSContext context].JSGlobalContextRef;
} }
@interface RealmReact () <RCTBridgeModule> @interface RealmReact () <RCTBridgeModule>

View File

@ -7,7 +7,7 @@
}, },
"dependencies": { "dependencies": {
"react": "~15.2.0", "react": "~15.2.0",
"react-native": "^0.29.0", "react-native": "^0.31.0",
"react-native-fs": "^1.1.0", "react-native-fs": "^1.1.0",
"xmlbuilder": "^4.2.1", "xmlbuilder": "^4.2.1",
"realm": "file:../..", "realm": "file:../..",