Update to support React Native 0.15.0

Resolves #173
This commit is contained in:
Scott Kyle 2015-11-30 13:48:43 -08:00
parent 8224cbb09e
commit 1f64573b4e
3 changed files with 5 additions and 6 deletions

View File

@ -6,7 +6,7 @@
"start": "react-native start" "start": "react-native start"
}, },
"dependencies": { "dependencies": {
"react-native": "^0.14.2", "react-native": "^0.15.0",
"realm": "file:../../lib" "realm": "file:../../lib"
} }
} }

View File

@ -7,10 +7,10 @@
#import "RCTBridge.h" #import "RCTBridge.h"
#import "RCTDevMenu.h" #import "RCTDevMenu.h"
@import ObjectiveC;
@import RealmReact; @import RealmReact;
extern void JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions(JSGlobalContextRef ctx, bool includesNativeCallStack); extern void JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions(JSGlobalContextRef ctx, bool includesNativeCallStack);
extern NSMutableArray *RCTGetModuleClasses(void);
@interface RealmReactTests : RealmJSTests @interface RealmReactTests : RealmJSTests
@end @end
@ -21,9 +21,8 @@ extern void JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions(JSG
@implementation RealmReactTests @implementation RealmReactTests
+ (void)load { + (void)load {
// We don't want the RCTDevMenu from switching the executor class from underneath us. NSMutableArray *moduleClasses = RCTGetModuleClasses();
IMP init = class_getMethodImplementation([NSObject class], @selector(init)); [moduleClasses removeObject:[RCTDevMenu class]];
class_replaceMethod([RCTDevMenu class], @selector(init), init, NULL);
} }
+ (Class)executorClass { + (Class)executorClass {

View File

@ -6,7 +6,7 @@
"start": "react-native start" "start": "react-native start"
}, },
"dependencies": { "dependencies": {
"react-native": "^0.14.2", "react-native": "^0.15.0",
"realm": "file:../../lib", "realm": "file:../../lib",
"realm-tests": "file:../lib" "realm-tests": "file:../lib"
} }