From 87ee697f53cd44cebb6c291e4888902a0a1b501a Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Thu, 3 Mar 2016 15:34:56 -0800 Subject: [PATCH] react native test app fixes --- RealmJS.xcodeproj/project.pbxproj | 4 ---- react-native/RealmReact.mm | 3 ++- tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/RealmJS.xcodeproj/project.pbxproj b/RealmJS.xcodeproj/project.pbxproj index f46ceb81..bd29964a 100644 --- a/RealmJS.xcodeproj/project.pbxproj +++ b/RealmJS.xcodeproj/project.pbxproj @@ -168,8 +168,6 @@ 02B58CB11AE99CEC009B348C /* RealmJS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RealmJS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 02B58CBC1AE99CEC009B348C /* RealmJSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RealmJSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 02B58CCD1AE99D4D009B348C /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; - 02EF76851BFFDE37000D5BAD /* test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = test.cpp; path = "src/object-store/parser/test.cpp"; sourceTree = SOURCE_ROOT; }; - 02EF76871BFFDE9E000D5BAD /* GrammarTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GrammarTests.mm; path = ios/GrammarTests.mm; sourceTree = ""; }; 02F59EAE1C88F17D007F774C /* binding_context.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = binding_context.hpp; path = src/binding_context.hpp; sourceTree = ""; }; 02F59EAF1C88F17D007F774C /* index_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = index_set.cpp; path = src/index_set.cpp; sourceTree = ""; }; 02F59EB01C88F17D007F774C /* index_set.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = index_set.hpp; path = src/index_set.hpp; sourceTree = ""; }; @@ -377,8 +375,6 @@ 02409DC11BCF11D6005F3B3E /* RealmJSCoreTests.m */, F68A278A1BC2722A0063D40A /* RJSModuleLoader.h */, F68A278B1BC2722A0063D40A /* RJSModuleLoader.m */, - 02EF76871BFFDE9E000D5BAD /* GrammarTests.mm */, - 02EF76851BFFDE37000D5BAD /* test.cpp */, ); name = RealmJSTests; path = tests; diff --git a/react-native/RealmReact.mm b/react-native/RealmReact.mm index 7f929c2c..f4f3eab7 100644 --- a/react-native/RealmReact.mm +++ b/react-native/RealmReact.mm @@ -22,6 +22,7 @@ #import "js_init.h" #import "shared_realm.hpp" +#import "realm_coordinator.hpp" #import #import @@ -205,7 +206,7 @@ RCT_REMAP_METHOD(emit, emitEvent:(NSString *)eventName withObject:(id)object) { } } - realm::Realm::s_global_cache.clear(); + realm::_impl::RealmCoordinator::clear_all_caches(); } - (void)dealloc { diff --git a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj index a0b82dad..ca65fcdd 100644 --- a/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj +++ b/tests/react-test-app/ios/ReactTests.xcodeproj/project.pbxproj @@ -615,7 +615,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nnpm install realm realm-tests\ncp ../../../src/object-store/parser/queryTests.json ../node_modules/realm-tests/query-tests.json\n"; + shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nnpm install realm realm-tests\ncp ../../../src/object-store/tests/query.json ../node_modules/realm-tests/query-tests.json\n"; }; F6EDE5BF1C49007200B1085F /* Bundle React Native code and images */ = { isa = PBXShellScriptBuildPhase;