merge latest from master

This commit is contained in:
Ari Lazier 2016-01-13 12:46:07 -08:00
commit 63ffc760bd
29 changed files with 377 additions and 192 deletions

View File

@ -2,7 +2,7 @@
Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for Realm's JavaScript bindings for integrating with mobile apps built using ReactNative and Apache Cordova (PhoneGap).
## Setup
This repository uses submodules so you need to run `git submodule update --init --recursive` in the realm-js root directory before running any examples or including the project in your app.
This repository uses submodules so you need to run `git submodule update --init --recursive` in the realm-js root directory before running any examples.
## ReactNative Example
Make sure your environment is set up to run react native applications. Follow the instructions here https://facebook.github.io/react-native/docs/getting-started.html.
@ -10,11 +10,13 @@ Make sure your environment is set up to run react native applications. Follow th
The ReactNative example project is in the `examples/ReactExample` directory. You need to run `npm install` in this directory before running the example for the first time.
## ReactNative Project Setup
- Create a new ReactNative project `react-native init <project-name>` and open the generated XCode project.
- Drag `RealmJS.xcodeproj` into the `Libraries` folder in your project.
- Drag `RealmReact.framework` from the `Products` directory under `RealmJS.xcodeproj` into the `Embedded Binaries` section in the `General` tab for your app's target settings. Make sure the checkbox under `Code Sign On Copy` is **not checked** because having it checked will cause issues when trying to run your app on a device.
- In the `Build Phases` tab for your app's target settings, add `RealmReact.framework` to the `Link Binary with Library` build phases.
- In your app's `package.json` file, add the `realm` dependency with a path to the `realm-js/lib` folder like this: `"realm": "file:path/to/realm-js/lib"` (symlinks are not yet supported by the React Native packager, see [issue #637](https://github.com/facebook/react-native/issues/637)).
- Create a new ReactNative project: `react-native init <project-name>`
- Change directories into the new project (`cd <project-name>`) and add the `realm` dependency: `npm install --save git+ssh://git@github.com/realm/realm-js.git#beta` (please note it's **essential** to leave the `#beta` at the end)
- Open the generated Xcode project (`ios/<project-name>.xcodeproj`)
- Making sure the top-level project is selected in the sidebar, change the `iOS Deployment Target` to at least `8.0` in the project settings.
- Right-click the `Libraries` group in the sidebar and click `Add Files to “<project-name>”`. Select `node_modules/realm/RealmJS.xcodeproj` from the dialog.
- Drag `RealmReact.framework` from the `Products` directory under `RealmJS.xcodeproj` into the `Embedded Binaries` section in the `General` tab for your app's target settings.
- In the `Build Phases` tab for your app's target settings, make sure `RealmReact.framework` is added to the `Link Binary with Library` build phase.
- You can now `require('realm')` in your app's JS to use Realm!
## Getting Started
@ -155,6 +157,10 @@ You _may_ specify these property options as well:
#### `close()`
**WARNING:** This is only for advanced use cases and generally doesn't need to be used.
## Conduct
This project adheres to the Contributor Covenant [code of conduct](https://realm.io/conduct/).
By participating, you are expected to uphold this code. Please report unacceptable behavior to [info[at]realm.io](mailto:info+conduct@realm.io).
## License
Copyright 2015 Realm Inc - All Rights Reserved
Proprietary and Confidential

View File

@ -16,12 +16,7 @@
0270BC6D1B7CFC1C00010E03 /* property.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 0270BC621B7CFC1C00010E03 /* property.hpp */; };
0270BC6F1B7CFC1C00010E03 /* results.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 0270BC641B7CFC1C00010E03 /* results.hpp */; };
0270BC711B7CFC1C00010E03 /* shared_realm.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 0270BC661B7CFC1C00010E03 /* shared_realm.hpp */; };
0270BC811B7D020100010E03 /* ObjectTests.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC791B7D020100010E03 /* ObjectTests.js */; };
0270BC821B7D020100010E03 /* RealmJSTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0270BC7B1B7D020100010E03 /* RealmJSTests.mm */; };
0270BC831B7D020100010E03 /* RealmTests.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC7C1B7D020100010E03 /* RealmTests.js */; };
0270BC841B7D020100010E03 /* ResultsTests.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC7D1B7D020100010E03 /* ResultsTests.js */; };
0270BC851B7D020100010E03 /* asserts.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC7E1B7D020100010E03 /* asserts.js */; };
0270BC861B7D020100010E03 /* schemas.js in Resources */ = {isa = PBXBuildFile; fileRef = 0270BC7F1B7D020100010E03 /* schemas.js */; };
0270BC871B7D023200010E03 /* RealmJS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CB11AE99CEC009B348C /* RealmJS.framework */; };
0270BCD11B7D067300010E03 /* RealmReact.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0270BCD01B7D067300010E03 /* RealmReact.mm */; };
02786E341BF1065100937061 /* parser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 02786E321BF1065000937061 /* parser.hpp */; };
@ -42,12 +37,10 @@
02B58CCE1AE99D4D009B348C /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CCD1AE99D4D009B348C /* JavaScriptCore.framework */; };
02C0864F1BCDB27000942F9C /* list.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 02C0864D1BCDB27000942F9C /* list.hpp */; };
02D0F23B1BF6C95200B4FC45 /* binding_context.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 02D0F23A1BF6C95200B4FC45 /* binding_context.hpp */; };
02D456DA1B7E59A500EE1299 /* ArrayTests.js in Resources */ = {isa = PBXBuildFile; fileRef = 02D456D91B7E59A500EE1299 /* ArrayTests.js */; };
02D8D1F71B601984006DB49D /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 02B58CCD1AE99D4D009B348C /* JavaScriptCore.framework */; };
02E9A9F11BFA84F100939F86 /* QueryTests.js in Resources */ = {isa = PBXBuildFile; fileRef = 02E9A9F01BFA84F100939F86 /* QueryTests.js */; };
02EF76761BFFD41F000D5BAD /* queryTests.json in Resources */ = {isa = PBXBuildFile; fileRef = 02EF76751BFFD41F000D5BAD /* queryTests.json */; };
02EF76861BFFDE37000D5BAD /* test.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 02EF76851BFFDE37000D5BAD /* test.cpp */; };
02EF76881BFFDE9E000D5BAD /* GrammarTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 02EF76871BFFDE9E000D5BAD /* GrammarTests.mm */; };
F61378791C18EAC5008BFC51 /* lib in Resources */ = {isa = PBXBuildFile; fileRef = F61378781C18EAAC008BFC51 /* lib */; };
F636F6C81BCDB3570023F35C /* RealmReact.h in Headers */ = {isa = PBXBuildFile; fileRef = 0270BCCF1B7D067300010E03 /* RealmReact.h */; settings = {ATTRIBUTES = (Public, ); }; };
F63FF2C61C12469E00B3B8E0 /* js_init.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 029048011C0428DF00ABDED4 /* js_init.cpp */; };
F63FF2C71C12469E00B3B8E0 /* js_list.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 029048031C0428DF00ABDED4 /* js_list.cpp */; };
@ -91,11 +84,8 @@
F63FF32D1C16432E00B3B8E0 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F63FF32C1C16432E00B3B8E0 /* CFNetwork.framework */; };
F63FF32F1C16433900B3B8E0 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F63FF32E1C16433900B3B8E0 /* libxml2.tbd */; };
F63FF3311C16434400B3B8E0 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = F63FF3301C16434400B3B8E0 /* libz.tbd */; };
F64E1EF11BC3510E00E0E150 /* util.js in Resources */ = {isa = PBXBuildFile; fileRef = F64E1EF01BC3510E00E0E150 /* util.js */; };
F68A278C1BC2722A0063D40A /* RJSModuleLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = F68A278B1BC2722A0063D40A /* RJSModuleLoader.m */; };
F68A278E1BC30F0A0063D40A /* index.js in Resources */ = {isa = PBXBuildFile; fileRef = F68A278D1BC30F0A0063D40A /* index.js */; };
F6BB7DF21BF681BC00D0A69E /* base64.hpp in Headers */ = {isa = PBXBuildFile; fileRef = F6BB7DF01BF681BC00D0A69E /* base64.hpp */; };
F6F405F81BCF0C1A00A1E24F /* base-test.js in Resources */ = {isa = PBXBuildFile; fileRef = F6F405F71BCF0C1A00A1E24F /* base-test.js */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@ -157,72 +147,65 @@
/* Begin PBXFileReference section */
022D59301C043340001E25FE /* ReactTests.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactTests.xcodeproj; path = "tests/react-test-app/ios/ReactTests.xcodeproj"; sourceTree = "<group>"; };
02409DC11BCF11D6005F3B3E /* RealmJSCoreTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RealmJSCoreTests.m; path = tests/ios/RealmJSCoreTests.m; sourceTree = SOURCE_ROOT; };
02601F051BA0F0CD007C91FF /* index_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = index_set.cpp; path = "src/object-store/index_set.cpp"; sourceTree = "<group>"; };
02601F061BA0F0CD007C91FF /* index_set.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = index_set.hpp; path = "src/object-store/index_set.hpp"; sourceTree = "<group>"; };
02601F0B1BA0F3A7007C91FF /* schema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = schema.cpp; path = "src/object-store/schema.cpp"; sourceTree = "<group>"; };
02601F0C1BA0F3A7007C91FF /* schema.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = schema.hpp; path = "src/object-store/schema.hpp"; sourceTree = "<group>"; };
0270BC5A1B7CFC1300010E03 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = src/ios/Info.plist; sourceTree = "<group>"; };
0270BC5D1B7CFC1C00010E03 /* object_accessor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = object_accessor.hpp; path = "src/object-store/object_accessor.hpp"; sourceTree = "<group>"; };
0270BC5E1B7CFC1C00010E03 /* object_schema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = object_schema.cpp; path = "src/object-store/object_schema.cpp"; sourceTree = "<group>"; };
0270BC5F1B7CFC1C00010E03 /* object_schema.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = object_schema.hpp; path = "src/object-store/object_schema.hpp"; sourceTree = "<group>"; };
0270BC601B7CFC1C00010E03 /* object_store.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = object_store.cpp; path = "src/object-store/object_store.cpp"; sourceTree = "<group>"; };
0270BC611B7CFC1C00010E03 /* object_store.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = object_store.hpp; path = "src/object-store/object_store.hpp"; sourceTree = "<group>"; };
0270BC621B7CFC1C00010E03 /* property.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = property.hpp; path = "src/object-store/property.hpp"; sourceTree = "<group>"; };
0270BC631B7CFC1C00010E03 /* results.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = results.cpp; path = "src/object-store/results.cpp"; sourceTree = "<group>"; };
0270BC641B7CFC1C00010E03 /* results.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = results.hpp; path = "src/object-store/results.hpp"; sourceTree = "<group>"; };
0270BC651B7CFC1C00010E03 /* shared_realm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = shared_realm.cpp; path = "src/object-store/shared_realm.cpp"; sourceTree = "<group>"; };
0270BC661B7CFC1C00010E03 /* shared_realm.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = shared_realm.hpp; path = "src/object-store/shared_realm.hpp"; sourceTree = "<group>"; };
0270BC781B7D020100010E03 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = tests/ios/Info.plist; sourceTree = SOURCE_ROOT; };
0270BC791B7D020100010E03 /* ObjectTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = ObjectTests.js; path = tests/lib/ObjectTests.js; sourceTree = SOURCE_ROOT; };
0270BC7A1B7D020100010E03 /* RealmJSTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RealmJSTests.h; path = tests/ios/RealmJSTests.h; sourceTree = SOURCE_ROOT; };
0270BC7B1B7D020100010E03 /* RealmJSTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RealmJSTests.mm; path = tests/ios/RealmJSTests.mm; sourceTree = SOURCE_ROOT; };
0270BC7C1B7D020100010E03 /* RealmTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = RealmTests.js; path = tests/lib/RealmTests.js; sourceTree = SOURCE_ROOT; };
0270BC7D1B7D020100010E03 /* ResultsTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = ResultsTests.js; path = tests/lib/ResultsTests.js; sourceTree = SOURCE_ROOT; };
0270BC7E1B7D020100010E03 /* asserts.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = asserts.js; path = tests/lib/asserts.js; sourceTree = SOURCE_ROOT; };
0270BC7F1B7D020100010E03 /* schemas.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = schemas.js; path = tests/lib/schemas.js; sourceTree = SOURCE_ROOT; };
02409DC11BCF11D6005F3B3E /* RealmJSCoreTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RealmJSCoreTests.m; path = ios/RealmJSCoreTests.m; sourceTree = "<group>"; };
02601F051BA0F0CD007C91FF /* index_set.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = index_set.cpp; sourceTree = "<group>"; };
02601F061BA0F0CD007C91FF /* index_set.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = index_set.hpp; sourceTree = "<group>"; };
02601F0B1BA0F3A7007C91FF /* schema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = schema.cpp; sourceTree = "<group>"; };
02601F0C1BA0F3A7007C91FF /* schema.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = schema.hpp; sourceTree = "<group>"; };
0270BC5A1B7CFC1300010E03 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
0270BC5D1B7CFC1C00010E03 /* object_accessor.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = object_accessor.hpp; sourceTree = "<group>"; };
0270BC5E1B7CFC1C00010E03 /* object_schema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = object_schema.cpp; sourceTree = "<group>"; };
0270BC5F1B7CFC1C00010E03 /* object_schema.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = object_schema.hpp; sourceTree = "<group>"; };
0270BC601B7CFC1C00010E03 /* object_store.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = object_store.cpp; sourceTree = "<group>"; };
0270BC611B7CFC1C00010E03 /* object_store.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = object_store.hpp; sourceTree = "<group>"; };
0270BC621B7CFC1C00010E03 /* property.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = property.hpp; sourceTree = "<group>"; };
0270BC631B7CFC1C00010E03 /* results.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = results.cpp; sourceTree = "<group>"; };
0270BC641B7CFC1C00010E03 /* results.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = results.hpp; sourceTree = "<group>"; };
0270BC651B7CFC1C00010E03 /* shared_realm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shared_realm.cpp; sourceTree = "<group>"; };
0270BC661B7CFC1C00010E03 /* shared_realm.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = shared_realm.hpp; sourceTree = "<group>"; };
0270BC781B7D020100010E03 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = "<group>"; };
0270BC7A1B7D020100010E03 /* RealmJSTests.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RealmJSTests.h; path = ios/RealmJSTests.h; sourceTree = "<group>"; };
0270BC7B1B7D020100010E03 /* RealmJSTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RealmJSTests.mm; path = ios/RealmJSTests.mm; sourceTree = "<group>"; };
0270BCCF1B7D067300010E03 /* RealmReact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RealmReact.h; path = "react-native/RealmReact.h"; sourceTree = "<group>"; };
0270BCD01B7D067300010E03 /* RealmReact.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RealmReact.mm; path = "react-native/RealmReact.mm"; sourceTree = "<group>"; };
02786E311BF1065000937061 /* parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = parser.cpp; path = "src/object-store/parser/parser.cpp"; sourceTree = "<group>"; };
02786E321BF1065000937061 /* parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = parser.hpp; path = "src/object-store/parser/parser.hpp"; sourceTree = "<group>"; };
029048011C0428DF00ABDED4 /* js_init.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_init.cpp; path = src/js_init.cpp; sourceTree = "<group>"; };
029048021C0428DF00ABDED4 /* js_init.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = js_init.h; path = src/js_init.h; sourceTree = "<group>"; };
029048031C0428DF00ABDED4 /* js_list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_list.cpp; path = src/js_list.cpp; sourceTree = "<group>"; };
029048041C0428DF00ABDED4 /* js_list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = js_list.hpp; path = src/js_list.hpp; sourceTree = "<group>"; };
029048051C0428DF00ABDED4 /* js_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_object.cpp; path = src/js_object.cpp; sourceTree = "<group>"; };
029048061C0428DF00ABDED4 /* js_object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = js_object.hpp; path = src/js_object.hpp; sourceTree = "<group>"; };
029048071C0428DF00ABDED4 /* js_realm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_realm.cpp; path = src/js_realm.cpp; sourceTree = "<group>"; };
029048081C0428DF00ABDED4 /* js_realm.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = js_realm.hpp; path = src/js_realm.hpp; sourceTree = "<group>"; };
029048091C0428DF00ABDED4 /* js_results.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_results.cpp; path = src/js_results.cpp; sourceTree = "<group>"; };
0290480A1C0428DF00ABDED4 /* js_results.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = js_results.hpp; path = src/js_results.hpp; sourceTree = "<group>"; };
0290480B1C0428DF00ABDED4 /* js_schema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_schema.cpp; path = src/js_schema.cpp; sourceTree = "<group>"; };
0290480C1C0428DF00ABDED4 /* js_schema.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = js_schema.hpp; path = src/js_schema.hpp; sourceTree = "<group>"; };
0290480D1C0428DF00ABDED4 /* js_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = js_util.cpp; path = src/js_util.cpp; sourceTree = "<group>"; };
0290480E1C0428DF00ABDED4 /* js_util.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = js_util.hpp; path = src/js_util.hpp; sourceTree = "<group>"; };
0290480F1C0428DF00ABDED4 /* rpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rpc.cpp; path = src/rpc.cpp; sourceTree = "<group>"; };
029048101C0428DF00ABDED4 /* rpc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = rpc.hpp; path = src/rpc.hpp; sourceTree = "<group>"; };
029048351C042A3C00ABDED4 /* platform.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = platform.hpp; path = src/platform.hpp; sourceTree = "<group>"; };
029048381C042A8F00ABDED4 /* platform.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = platform.mm; path = src/ios/platform.mm; sourceTree = "<group>"; };
0290483A1C042EE200ABDED4 /* RealmJS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RealmJS.h; path = src/ios/RealmJS.h; sourceTree = "<group>"; };
029445911BDEDF40006D1617 /* transact_log_handler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = transact_log_handler.cpp; path = "src/object-store/impl/transact_log_handler.cpp"; sourceTree = "<group>"; };
029445921BDEDF40006D1617 /* transact_log_handler.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = transact_log_handler.hpp; path = "src/object-store/impl/transact_log_handler.hpp"; sourceTree = "<group>"; };
029445951BDEDF46006D1617 /* external_commit_helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = external_commit_helper.cpp; path = "src/object-store/impl/apple/external_commit_helper.cpp"; sourceTree = "<group>"; };
029445961BDEDF46006D1617 /* external_commit_helper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = external_commit_helper.hpp; path = "src/object-store/impl/apple/external_commit_helper.hpp"; sourceTree = "<group>"; };
0294465C1BF27DE6006D1617 /* query_builder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = query_builder.cpp; path = "src/object-store/parser/query_builder.cpp"; sourceTree = "<group>"; };
0294465D1BF27DE6006D1617 /* query_builder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = query_builder.hpp; path = "src/object-store/parser/query_builder.hpp"; sourceTree = "<group>"; };
02786E311BF1065000937061 /* parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = parser.cpp; path = parser/parser.cpp; sourceTree = "<group>"; };
02786E321BF1065000937061 /* parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = parser.hpp; path = parser/parser.hpp; sourceTree = "<group>"; };
029048011C0428DF00ABDED4 /* js_init.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_init.cpp; sourceTree = "<group>"; };
029048021C0428DF00ABDED4 /* js_init.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_init.h; sourceTree = "<group>"; };
029048031C0428DF00ABDED4 /* js_list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_list.cpp; sourceTree = "<group>"; };
029048041C0428DF00ABDED4 /* js_list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_list.hpp; sourceTree = "<group>"; };
029048051C0428DF00ABDED4 /* js_object.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_object.cpp; sourceTree = "<group>"; };
029048061C0428DF00ABDED4 /* js_object.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_object.hpp; sourceTree = "<group>"; };
029048071C0428DF00ABDED4 /* js_realm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_realm.cpp; sourceTree = "<group>"; };
029048081C0428DF00ABDED4 /* js_realm.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_realm.hpp; sourceTree = "<group>"; };
029048091C0428DF00ABDED4 /* js_results.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_results.cpp; sourceTree = "<group>"; };
0290480A1C0428DF00ABDED4 /* js_results.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_results.hpp; sourceTree = "<group>"; };
0290480B1C0428DF00ABDED4 /* js_schema.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_schema.cpp; sourceTree = "<group>"; };
0290480C1C0428DF00ABDED4 /* js_schema.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_schema.hpp; sourceTree = "<group>"; };
0290480D1C0428DF00ABDED4 /* js_util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_util.cpp; sourceTree = "<group>"; };
0290480E1C0428DF00ABDED4 /* js_util.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = js_util.hpp; sourceTree = "<group>"; };
0290480F1C0428DF00ABDED4 /* rpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = rpc.cpp; sourceTree = "<group>"; };
029048101C0428DF00ABDED4 /* rpc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = rpc.hpp; sourceTree = "<group>"; };
029048351C042A3C00ABDED4 /* platform.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = platform.hpp; sourceTree = "<group>"; };
029048381C042A8F00ABDED4 /* platform.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = platform.mm; sourceTree = "<group>"; };
0290483A1C042EE200ABDED4 /* RealmJS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RealmJS.h; sourceTree = "<group>"; };
029445911BDEDF40006D1617 /* transact_log_handler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = transact_log_handler.cpp; path = impl/transact_log_handler.cpp; sourceTree = "<group>"; };
029445921BDEDF40006D1617 /* transact_log_handler.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = transact_log_handler.hpp; path = impl/transact_log_handler.hpp; sourceTree = "<group>"; };
029445951BDEDF46006D1617 /* external_commit_helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = external_commit_helper.cpp; path = impl/apple/external_commit_helper.cpp; sourceTree = "<group>"; };
029445961BDEDF46006D1617 /* external_commit_helper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = external_commit_helper.hpp; path = impl/apple/external_commit_helper.hpp; sourceTree = "<group>"; };
0294465C1BF27DE6006D1617 /* query_builder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = query_builder.cpp; path = parser/query_builder.cpp; sourceTree = "<group>"; };
0294465D1BF27DE6006D1617 /* query_builder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = query_builder.hpp; path = parser/query_builder.hpp; sourceTree = "<group>"; };
02A3C7A41BC4341500B1A7BE /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
02B29A161B7CF7C9008A7E6B /* RealmReact.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RealmReact.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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; };
02C0864C1BCDB27000942F9C /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = list.cpp; path = "src/object-store/list.cpp"; sourceTree = "<group>"; };
02C0864D1BCDB27000942F9C /* list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = list.hpp; path = "src/object-store/list.hpp"; sourceTree = "<group>"; };
02D0F23A1BF6C95200B4FC45 /* binding_context.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = binding_context.hpp; path = "src/object-store/binding_context.hpp"; sourceTree = "<group>"; };
02D456D91B7E59A500EE1299 /* ArrayTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = ArrayTests.js; path = tests/lib/ArrayTests.js; sourceTree = SOURCE_ROOT; };
02E9A9F01BFA84F100939F86 /* QueryTests.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = QueryTests.js; path = tests/lib/QueryTests.js; sourceTree = SOURCE_ROOT; };
02EF76751BFFD41F000D5BAD /* queryTests.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = queryTests.json; path = "src/object-store/parser/queryTests.json"; sourceTree = SOURCE_ROOT; };
02C0864C1BCDB27000942F9C /* list.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = list.cpp; sourceTree = "<group>"; };
02C0864D1BCDB27000942F9C /* list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = list.hpp; sourceTree = "<group>"; };
02D0F23A1BF6C95200B4FC45 /* binding_context.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = binding_context.hpp; sourceTree = "<group>"; };
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 = tests/ios/GrammarTests.mm; sourceTree = SOURCE_ROOT; };
02EF76871BFFDE9E000D5BAD /* GrammarTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GrammarTests.mm; path = ios/GrammarTests.mm; sourceTree = "<group>"; };
F61378781C18EAAC008BFC51 /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; path = lib; sourceTree = "<group>"; };
F63FF2B11C1241E500B3B8E0 /* libRealmJS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRealmJS.a; sourceTree = BUILT_PRODUCTS_DIR; };
F63FF2DC1C15659A00B3B8E0 /* RealmJS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RealmJS.mm; sourceTree = "<group>"; };
F63FF2F01C16405C00B3B8E0 /* libGCDWebServers.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libGCDWebServers.a; sourceTree = BUILT_PRODUCTS_DIR; };
@ -259,14 +242,11 @@
F63FF32C1C16432E00B3B8E0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
F63FF32E1C16433900B3B8E0 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
F63FF3301C16434400B3B8E0 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
F64E1EF01BC3510E00E0E150 /* util.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = util.js; path = tests/lib/util.js; sourceTree = SOURCE_ROOT; };
F68A278A1BC2722A0063D40A /* RJSModuleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RJSModuleLoader.h; path = tests/ios/RJSModuleLoader.h; sourceTree = SOURCE_ROOT; };
F68A278B1BC2722A0063D40A /* RJSModuleLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RJSModuleLoader.m; path = tests/ios/RJSModuleLoader.m; sourceTree = SOURCE_ROOT; };
F68A278D1BC30F0A0063D40A /* index.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = index.js; path = tests/lib/index.js; sourceTree = SOURCE_ROOT; };
F68A278A1BC2722A0063D40A /* RJSModuleLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RJSModuleLoader.h; path = ios/RJSModuleLoader.h; sourceTree = "<group>"; };
F68A278B1BC2722A0063D40A /* RJSModuleLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RJSModuleLoader.m; path = ios/RJSModuleLoader.m; sourceTree = "<group>"; };
F6BB7DEF1BF681BC00D0A69E /* base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = base64.cpp; sourceTree = "<group>"; };
F6BB7DF01BF681BC00D0A69E /* base64.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = base64.hpp; sourceTree = "<group>"; };
F6C3FBBC1BF680EC00E6FFD4 /* json.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = json.hpp; sourceTree = "<group>"; };
F6F405F71BCF0C1A00A1E24F /* base-test.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "base-test.js"; path = "tests/lib/base-test.js"; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -324,8 +304,8 @@
0270BC3D1B7CFBFD00010E03 /* RealmJS */ = {
isa = PBXGroup;
children = (
0290483A1C042EE200ABDED4 /* RealmJS.h */,
F63FF2DC1C15659A00B3B8E0 /* RealmJS.mm */,
F62A35131C18E6E2004A917D /* iOS */,
F62A35141C18E783004A917D /* Object Store */,
029048011C0428DF00ABDED4 /* js_init.cpp */,
029048021C0428DF00ABDED4 /* js_init.h */,
029048031C0428DF00ABDED4 /* js_list.cpp */,
@ -340,38 +320,12 @@
0290480C1C0428DF00ABDED4 /* js_schema.hpp */,
0290480D1C0428DF00ABDED4 /* js_util.cpp */,
0290480E1C0428DF00ABDED4 /* js_util.hpp */,
029048351C042A3C00ABDED4 /* platform.hpp */,
0290480F1C0428DF00ABDED4 /* rpc.cpp */,
029048101C0428DF00ABDED4 /* rpc.hpp */,
029048351C042A3C00ABDED4 /* platform.hpp */,
029048381C042A8F00ABDED4 /* platform.mm */,
0270BC5D1B7CFC1C00010E03 /* object_accessor.hpp */,
0270BC5E1B7CFC1C00010E03 /* object_schema.cpp */,
0270BC5F1B7CFC1C00010E03 /* object_schema.hpp */,
0270BC601B7CFC1C00010E03 /* object_store.cpp */,
0270BC611B7CFC1C00010E03 /* object_store.hpp */,
0270BC621B7CFC1C00010E03 /* property.hpp */,
0270BC631B7CFC1C00010E03 /* results.cpp */,
0270BC641B7CFC1C00010E03 /* results.hpp */,
0270BC651B7CFC1C00010E03 /* shared_realm.cpp */,
0270BC661B7CFC1C00010E03 /* shared_realm.hpp */,
02D0F23A1BF6C95200B4FC45 /* binding_context.hpp */,
02601F051BA0F0CD007C91FF /* index_set.cpp */,
02601F061BA0F0CD007C91FF /* index_set.hpp */,
02C0864C1BCDB27000942F9C /* list.cpp */,
02C0864D1BCDB27000942F9C /* list.hpp */,
02601F0B1BA0F3A7007C91FF /* schema.cpp */,
02601F0C1BA0F3A7007C91FF /* schema.hpp */,
029445911BDEDF40006D1617 /* transact_log_handler.cpp */,
029445921BDEDF40006D1617 /* transact_log_handler.hpp */,
029445951BDEDF46006D1617 /* external_commit_helper.cpp */,
029445961BDEDF46006D1617 /* external_commit_helper.hpp */,
02786E311BF1065000937061 /* parser.cpp */,
02786E321BF1065000937061 /* parser.hpp */,
0294465C1BF27DE6006D1617 /* query_builder.cpp */,
0294465D1BF27DE6006D1617 /* query_builder.hpp */,
0270BC5A1B7CFC1300010E03 /* Info.plist */,
);
name = RealmJS;
path = src;
sourceTree = "<group>";
};
0270BCCE1B7D066100010E03 /* RealmReact */ = {
@ -411,18 +365,8 @@
02B58CC01AE99CEC009B348C /* RealmJSTests */ = {
isa = PBXGroup;
children = (
F61378781C18EAAC008BFC51 /* lib */,
0270BC781B7D020100010E03 /* Info.plist */,
F68A278D1BC30F0A0063D40A /* index.js */,
0270BC7E1B7D020100010E03 /* asserts.js */,
F6F405F71BCF0C1A00A1E24F /* base-test.js */,
0270BC7F1B7D020100010E03 /* schemas.js */,
F64E1EF01BC3510E00E0E150 /* util.js */,
02D456D91B7E59A500EE1299 /* ArrayTests.js */,
0270BC791B7D020100010E03 /* ObjectTests.js */,
02E9A9F01BFA84F100939F86 /* QueryTests.js */,
02EF76751BFFD41F000D5BAD /* queryTests.json */,
0270BC7C1B7D020100010E03 /* RealmTests.js */,
0270BC7D1B7D020100010E03 /* ResultsTests.js */,
0270BC7A1B7D020100010E03 /* RealmJSTests.h */,
0270BC7B1B7D020100010E03 /* RealmJSTests.mm */,
02409DC11BCF11D6005F3B3E /* RealmJSCoreTests.m */,
@ -431,7 +375,8 @@
02EF76871BFFDE9E000D5BAD /* GrammarTests.mm */,
02EF76851BFFDE37000D5BAD /* test.cpp */,
);
path = RealmJSTests;
name = RealmJSTests;
path = tests;
sourceTree = "<group>";
};
02B58CCF1AE99D8C009B348C /* Frameworks */ = {
@ -448,6 +393,51 @@
name = Frameworks;
sourceTree = "<group>";
};
F62A35131C18E6E2004A917D /* iOS */ = {
isa = PBXGroup;
children = (
0290483A1C042EE200ABDED4 /* RealmJS.h */,
F63FF2DC1C15659A00B3B8E0 /* RealmJS.mm */,
029048381C042A8F00ABDED4 /* platform.mm */,
0270BC5A1B7CFC1300010E03 /* Info.plist */,
);
name = iOS;
path = ios;
sourceTree = "<group>";
};
F62A35141C18E783004A917D /* Object Store */ = {
isa = PBXGroup;
children = (
0270BC5D1B7CFC1C00010E03 /* object_accessor.hpp */,
0270BC5E1B7CFC1C00010E03 /* object_schema.cpp */,
0270BC5F1B7CFC1C00010E03 /* object_schema.hpp */,
0270BC601B7CFC1C00010E03 /* object_store.cpp */,
0270BC611B7CFC1C00010E03 /* object_store.hpp */,
0270BC621B7CFC1C00010E03 /* property.hpp */,
0270BC631B7CFC1C00010E03 /* results.cpp */,
0270BC641B7CFC1C00010E03 /* results.hpp */,
0270BC651B7CFC1C00010E03 /* shared_realm.cpp */,
0270BC661B7CFC1C00010E03 /* shared_realm.hpp */,
02D0F23A1BF6C95200B4FC45 /* binding_context.hpp */,
02601F051BA0F0CD007C91FF /* index_set.cpp */,
02601F061BA0F0CD007C91FF /* index_set.hpp */,
02C0864C1BCDB27000942F9C /* list.cpp */,
02C0864D1BCDB27000942F9C /* list.hpp */,
02601F0B1BA0F3A7007C91FF /* schema.cpp */,
02601F0C1BA0F3A7007C91FF /* schema.hpp */,
029445911BDEDF40006D1617 /* transact_log_handler.cpp */,
029445921BDEDF40006D1617 /* transact_log_handler.hpp */,
029445951BDEDF46006D1617 /* external_commit_helper.cpp */,
029445961BDEDF46006D1617 /* external_commit_helper.hpp */,
02786E311BF1065000937061 /* parser.cpp */,
02786E321BF1065000937061 /* parser.hpp */,
0294465C1BF27DE6006D1617 /* query_builder.cpp */,
0294465D1BF27DE6006D1617 /* query_builder.hpp */,
);
name = "Object Store";
path = "object-store";
sourceTree = "<group>";
};
F63FF2FB1C1642BB00B3B8E0 /* GCDWebServer */ = {
isa = PBXGroup;
children = (
@ -611,6 +601,7 @@
02B58CB81AE99CEC009B348C /* Sources */,
02B58CB91AE99CEC009B348C /* Frameworks */,
02B58CBA1AE99CEC009B348C /* Resources */,
F613787A1C18F003008BFC51 /* Copy Query Tests */,
);
buildRules = (
);
@ -737,23 +728,27 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
F64E1EF11BC3510E00E0E150 /* util.js in Resources */,
02E9A9F11BFA84F100939F86 /* QueryTests.js in Resources */,
0270BC851B7D020100010E03 /* asserts.js in Resources */,
0270BC811B7D020100010E03 /* ObjectTests.js in Resources */,
02D456DA1B7E59A500EE1299 /* ArrayTests.js in Resources */,
0270BC861B7D020100010E03 /* schemas.js in Resources */,
F6F405F81BCF0C1A00A1E24F /* base-test.js in Resources */,
F68A278E1BC30F0A0063D40A /* index.js in Resources */,
02EF76761BFFD41F000D5BAD /* queryTests.json in Resources */,
0270BC831B7D020100010E03 /* RealmTests.js in Resources */,
0270BC841B7D020100010E03 /* ResultsTests.js in Resources */,
F61378791C18EAC5008BFC51 /* lib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
F613787A1C18F003008BFC51 /* Copy Query Tests */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Query Tests";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cp src/object-store/parser/queryTests.json \"$TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH/lib/query-tests.json\"";
};
F63FF2C51C12462600B3B8E0 /* Download Core */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -880,11 +875,6 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(BUILT_PRODUCTS_DIR)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
@ -894,6 +884,7 @@
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/vendor",
"$(SRCROOT)/vendor/GCDWebServer",
"$(SRCROOT)/../react-native/React/Base",
"$(SRCROOT)/tests/react-test-app/node_modules/react-native/React/Base",
"$(SRCROOT)/examples/ReactExample/node_modules/react-native/React/Base",
);
@ -918,16 +909,12 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(BUILT_PRODUCTS_DIR)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/vendor",
"$(SRCROOT)/vendor/GCDWebServer",
"$(SRCROOT)/../react-native/React/Base",
"$(SRCROOT)/tests/react-test-app/node_modules/react-native/React/Base",
"$(SRCROOT)/examples/ReactExample/node_modules/react-native/React/Base",
);
@ -951,16 +938,12 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)",
"$(BUILT_PRODUCTS_DIR)",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/vendor",
"$(SRCROOT)/vendor/GCDWebServer",
"$(SRCROOT)/../react-native/React/Base",
"$(SRCROOT)/tests/react-test-app/node_modules/react-native/React/Base",
"$(SRCROOT)/examples/ReactExample/node_modules/react-native/React/Base",
);

View File

@ -7,6 +7,6 @@
},
"dependencies": {
"react-native": "0.16.0",
"realm": "file:../../lib"
"realm": "file:../.."
}
}

View File

@ -12,4 +12,4 @@ if (typeof Realm != 'undefined') {
module.exports = require('./realm');
} else {
throw new Error('Missing Realm constructor - please ensure RealmReact framework is included!');
}
}

View File

@ -13,6 +13,12 @@ module.exports = {
class List {}
// Non-mutating methods:
util.createMethods(List.prototype, constants.propTypes.LIST, [
'snapshot',
]);
// Mutating methods:
util.createMethods(List.prototype, constants.propTypes.LIST, [
'pop',
'shift',

View File

@ -1,5 +0,0 @@
{
"name": "realm",
"version": "0.0.1",
"private": true
}

View File

@ -14,6 +14,7 @@ module.exports = {
class Results {}
util.createMethods(Results.prototype, constants.objectTypes.RESULTS, [
'snapshot',
'sortByProperty',
]);

14
package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "realm",
"version": "0.0.1",
"private": true,
"main": "lib/index.js",
"files": [
"lib",
"react-native",
"scripts",
"src",
"vendor",
"RealmJS.xcodeproj"
]
}

View File

@ -3,7 +3,7 @@
set -e
set -o pipefail
: ${REALM_CORE_VERSION:=0.94.4} # set to "current" to always use the current build
: ${REALM_CORE_VERSION:=0.95.5} # set to "current" to always use the current build
echo "Downloading dependency: core ${REALM_CORE_VERSION}"

43
scripts/publish-beta.sh Executable file
View File

@ -0,0 +1,43 @@
#!/bin/bash
set -e
set -o pipefail
cd "$(dirname "$0")/.."
# Check if the worktree (or submodules) are dirty.
if ! git diff --ignore-submodules=none --no-ext-diff --quiet --exit-code HEAD; then
echo 'Publishing requires a clean work tree!' >&2
exit 1
fi
GIT_AUTHOR_NAME=$(git config --get user.name)
GIT_AUTHOR_EMAIL=$(git config --get user.email)
GIT_ORIGIN_URL=$(git ls-remote --get-url origin)
# Reset these variables just in case they were inherited from the environment.
TEMP_DIR=
PACKAGE=
# Cleanup before this script exits.
trap 'rm -rf "$TEMP_DIR" "$PACKAGE"' EXIT
TEMP_DIR=$(mktemp -d -t realm-js)
PACKAGE=$(npm pack | tail -n 1)
tar -xf "$PACKAGE" -C "$TEMP_DIR"
(
cd "$TEMP_DIR/package"
export GIT_AUTHOR_NAME
export GIT_AUTHOR_EMAIL
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
git init
git add .
git commit -m 'Beta build'
git remote add origin "$GIT_ORIGIN_URL"
git push -f origin master:beta
)

View File

@ -4,6 +4,7 @@
#include "js_list.hpp"
#include "js_object.hpp"
#include "js_results.hpp"
#include "js_util.hpp"
#include "object_accessor.hpp"
@ -186,6 +187,22 @@ JSValueRef ListSplice(JSContextRef ctx, JSObjectRef function, JSObjectRef thisOb
return NULL;
}
JSValueRef ListStaticResults(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* jsException) {
try {
List *list = RJSGetInternal<List *>(thisObject);
RJSValidateArgumentCount(argumentCount, 0);
Query query = list->get_query();
return RJSResultsCreate(ctx, list->realm(), list->get_object_schema(), query, false);
}
catch (std::exception &exp) {
if (jsException) {
*jsException = RJSMakeError(ctx, exp);
}
}
return NULL;
}
JSObjectRef RJSListCreate(JSContextRef ctx, realm::List &list) {
return RJSWrapObject<List *>(ctx, RJSListClass(), new List(list));
}
@ -196,6 +213,7 @@ static const JSStaticFunction RJSListFuncs[] = {
{"shift", ListShift, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"unshift", ListUnshift, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"splice", ListSplice, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"snapshot", ListStaticResults, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL},
};

View File

@ -22,9 +22,12 @@ JSValueRef ResultsGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef
return JSValueMakeNumber(ctx, size);
}
return RJSObjectCreate(ctx, Object(results->get_realm(),
results->get_object_schema(),
results->get(RJSValidatedPositiveIndex(indexStr))));
auto row = results->get(RJSValidatedPositiveIndex(indexStr));
if (!row.is_attached()) {
return JSValueMakeNull(ctx);
}
return RJSObjectCreate(ctx, Object(results->get_realm(), results->get_object_schema(), row));
}
catch (std::out_of_range &exp) {
// getters for nonexistent properties in JS should always return undefined
@ -62,19 +65,40 @@ bool ResultsSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef proper
void ResultsPropertyNames(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames) {
Results *results = RJSGetInternal<Results *>(object);
size_t size = results->size();
char str[32];
for (int i = 0; i < results->size(); i++) {
sprintf(str, "%i", i);
for (size_t i = 0; i < size; i++) {
sprintf(str, "%zu", i);
JSStringRef name = JSStringCreateWithUTF8CString(str);
JSPropertyNameAccumulatorAddName(propertyNames, name);
JSStringRelease(name);
}
}
JSValueRef SortByProperty(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* jsException) {
JSValueRef ResultsStaticCopy(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* jsException) {
try {
Results *results = RJSGetInternal<Results *>(thisObject);
RJSValidateArgumentCount(argumentCount, 0);
Results *copy = new Results(*results);
copy->set_live(false);
return RJSWrapObject<Results *>(ctx, RJSResultsClass(), copy);
}
catch (std::exception &exp) {
if (jsException) {
*jsException = RJSMakeError(ctx, exp);
}
}
return NULL;
}
JSValueRef ResultsSortByProperty(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* jsException) {
try {
Results *results = RJSGetInternal<Results *>(thisObject);
RJSValidateArgumentRange(argumentCount, 1, 2);
std::string propName = RJSValidatedStringForValue(ctx, arguments[0]);
const Property *prop = results->get_object_schema().property_for_name(propName);
if (!prop) {
@ -105,7 +129,6 @@ JSObjectRef RJSResultsCreate(JSContextRef ctx, SharedRealm realm, std::string cl
return RJSWrapObject<Results *>(ctx, RJSResultsClass(), new Results(realm, *object_schema, *table));
}
JSObjectRef RJSResultsCreate(JSContextRef ctx, SharedRealm realm, std::string className, std::string queryString, std::vector<JSValueRef> args) {
TableRef table = ObjectStore::table_for_object_type(realm->read_group(), className);
Query query = table->where();
@ -121,8 +144,16 @@ JSObjectRef RJSResultsCreate(JSContextRef ctx, SharedRealm realm, std::string cl
return RJSWrapObject<Results *>(ctx, RJSResultsClass(), new Results(realm, *object_schema, std::move(query)));
}
JSObjectRef RJSResultsCreate(JSContextRef ctx, SharedRealm realm, const ObjectSchema &objectSchema, const Query &query, bool live) {
Results *results = new Results(realm, objectSchema, query);
results->set_live(live);
return RJSWrapObject<Results *>(ctx, RJSResultsClass(), results);
}
static const JSStaticFunction RJSResultsFuncs[] = {
{"sortByProperty", SortByProperty, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"snapshot", ResultsStaticCopy, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{"sortByProperty", ResultsSortByProperty, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum | kJSPropertyAttributeDontDelete},
{NULL, NULL},
};

View File

@ -9,9 +9,11 @@
namespace realm {
class Realm;
class Query;
typedef std::shared_ptr<Realm> SharedRealm;
}
JSClassRef RJSResultsClass();
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, std::string className);
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, std::string className, std::string query, std::vector<JSValueRef> args);
JSObjectRef RJSResultsCreate(JSContextRef ctx, realm::SharedRealm realm, const realm::ObjectSchema &objectSchema, const realm::Query &query, bool live = true);

View File

@ -60,6 +60,11 @@ void List::remove(std::size_t row_ndx) {
m_link_view->remove(row_ndx);
}
Query List::get_query() {
verify_attached();
return m_link_view->get_target_table().where(m_link_view);
}
void List::verify_valid_row(std::size_t row_ndx, bool insertion) {
size_t size = m_link_view->size();
if (row_ndx > size || (!insertion && row_ndx == size)) {

View File

@ -47,6 +47,8 @@ namespace realm {
template<typename ValueType, typename ContextType>
void set(ContextType ctx, ValueType value, size_t list_ndx);
Query get_query();
void verify_valid_row(std::size_t row_ndx, bool insertion = false);
void verify_attached();
void verify_in_tranaction();

View File

@ -67,6 +67,17 @@ void Results::validate_write() const
throw InvalidTransactionException("Must be in a write transaction");
}
void Results::set_live(bool live)
{
if (!live && m_mode == Mode::Table) {
m_query = m_table->where();
m_mode = Mode::Query;
}
update_tableview();
m_live = live;
}
size_t Results::size()
{
validate_read();
@ -94,7 +105,7 @@ RowExpr Results::get(size_t row_ndx)
case Mode::TableView:
update_tableview();
if (row_ndx < m_table_view.size())
return m_table_view.get(row_ndx);
return (!m_live && !m_table_view.is_row_attached(row_ndx)) ? RowExpr() : m_table_view.get(row_ndx);
break;
}
@ -148,7 +159,9 @@ void Results::update_tableview()
m_mode = Mode::TableView;
break;
case Mode::TableView:
m_table_view.sync_if_needed();
if (m_live) {
m_table_view.sync_if_needed();
}
break;
}
}

View File

@ -74,6 +74,9 @@ public:
// Get the object type which will be returned by get()
StringData get_object_type() const noexcept { return get_object_schema().name; }
// Set whether the TableView should sync if needed before accessing results
void set_live(bool live);
// Get the size of this results
// Can be either O(1) or O(N) depending on the state of things
size_t size();
@ -168,6 +171,7 @@ private:
TableView m_table_view;
Table* m_table = nullptr;
SortOrder m_sort;
bool m_live = true;
Mode m_mode = Mode::Empty;

View File

@ -20,7 +20,7 @@
JSContext *context = [[JSContext alloc] init];
JSValue *realmConstructor = [JSValue valueWithJSValueRef:RJSConstructorCreate(context.JSGlobalContextRef) inContext:context];
RJSModuleLoader *moduleLoader = [[RJSModuleLoader alloc] initWithContext:context];
NSURL *scriptURL = [[NSBundle bundleForClass:self] URLForResource:@"index" withExtension:@"js"];
NSURL *scriptURL = [[NSBundle bundleForClass:self] URLForResource:@"index" withExtension:@"js" subdirectory:@"lib"];
// Expose the Realm constructor as a global 'realm' CommonJS module.
[moduleLoader addGlobalModuleObject:realmConstructor forName:@"realm"];
@ -72,7 +72,12 @@
JSValue *message = [exception hasProperty:@"message"] ? exception[@"message"] : exception;
NSString *source = [exception hasProperty:@"sourceURL"] ? [exception[@"sourceURL"] toString] : nil;
NSUInteger line = [exception hasProperty:@"line"] ? [exception[@"line"] toUInt32] - 1 : 0;
NSURL *sourceURL = source ? [NSURL URLWithString:source.lastPathComponent relativeToURL:[NSURL URLWithString:@(__FILE__)]] : nil;
NSURL *sourceURL = nil;
if (source) {
NSString *path = [NSString pathWithComponents:@[[@(__FILE__) stringByDeletingLastPathComponent], @"..", @"lib", source.lastPathComponent]];
sourceURL = [NSURL URLWithString:path];
}
[self recordFailureWithDescription:message.description
inFile:sourceURL ? sourceURL.absoluteString : @(__FILE__)

View File

@ -4,29 +4,37 @@
'use strict';
exports.ArrayTests = require('./ArrayTests');
exports.ObjectTests = require('./ObjectTests');
exports.RealmTests = require('./RealmTests');
exports.ResultsTests = require('./ResultsTests');
exports.QueryTests = require('./QueryTests');
exports.ListTests = require('./list-tests');
exports.ObjectTests = require('./object-tests');
exports.RealmTests = require('./realm-tests');
exports.ResultsTests = require('./results-tests');
exports.QueryTests = require('./query-tests');
var SPECIAL_METHODS = {
beforeEach: true,
afterEach: true,
};
Object.defineProperty(exports, 'getTestNames', {
value: function() {
var testNames = {};
// Only the test suites should be iterable members of exports.
Object.defineProperties(exports, {
getTestNames: {
value: function() {
var testNames = {};
for (var suiteName in exports) {
var testSuite = exports[suiteName];
for (var suiteName in exports) {
var testSuite = exports[suiteName];
testNames[suiteName] = Object.keys(testSuite).filter(function(testName) {
return !(testName in SPECIAL_METHODS) && typeof testSuite[testName] == 'function';
});
testNames[suiteName] = Object.keys(testSuite).filter(function(testName) {
return !(testName in SPECIAL_METHODS) && typeof testSuite[testName] == 'function';
});
}
return testNames;
}
return testNames;
}
},
runTest: {
value: function(suiteName, testName) {
exports[suiteName][testName]();
}
},
});

View File

@ -341,4 +341,38 @@ module.exports = BaseTest.extend({
TestCase.assertEqual(array.length, 2);
TestCase.assertEqual(objects.length, 4);
},
testStaticResults: function() {
var realm = new Realm({schema: [schemas.LinkTypes, schemas.TestObject]});
var objects = realm.objects('TestObject');
var array;
realm.write(function() {
var obj = realm.create('LinkTypesObject', [[1], [2], [[3], [4]]]);
array = obj.arrayCol;
});
var objectsCopy = objects.snapshot();
var arrayCopy = array.snapshot();
TestCase.assertEqual(objectsCopy.length, 4);
TestCase.assertEqual(arrayCopy.length, 2);
realm.write(function() {
array.push([5]);
TestCase.assertEqual(objectsCopy.length, 4);
TestCase.assertEqual(arrayCopy.length, 2);
TestCase.assertEqual(objectsCopy.snapshot().length, 4);
TestCase.assertEqual(arrayCopy.snapshot().length, 2);
TestCase.assertEqual(objects.snapshot().length, 5);
TestCase.assertEqual(array.snapshot().length, 3);
realm.delete(array[0]);
TestCase.assertEqual(objectsCopy.length, 4);
TestCase.assertEqual(arrayCopy.length, 2);
TestCase.assertEqual(arrayCopy[0], null);
});
},
});

View File

@ -9,7 +9,7 @@ var Realm = require('realm');
var BaseTest = require('./base-test');
var TestCase = require('./asserts');
var schemas = require('./schemas');
var testCases = require('./queryTests.json');
var testCases = require('./query-tests.json');
var typeConverters = {};

View File

@ -617,7 +617,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nrm -rf ../node_modules/realm ../node_modules/realm-tests\nnpm install realm realm-tests\ncp ../../../src/object-store/parser/queryTests.json ../node_modules/realm-tests\n";
shellScript = "[ -s \"${HOME}/.nvm/nvm.sh\" ] && . \"${HOME}/.nvm/nvm.sh\" \nrm -rf ../node_modules/realm ../node_modules/realm-tests\nnpm install realm realm-tests\ncp ../../../src/object-store/parser/queryTests.json ../node_modules/realm-tests/query-tests.json\n";
};
/* End PBXShellScriptBuildPhase section */

View File

@ -79,7 +79,7 @@ extern NSMutableArray *RCTGetModuleClasses(void);
}
NSError *error;
NSDictionary *testCaseNames = [self invokeMethod:@"getTestNames" inModule:@"index" error:&error];
NSDictionary *testCaseNames = [self invokeMethod:@"getTestNames" arguments:nil error:&error];
if (error || !testCaseNames.count) {
NSLog(@"Error from calling getTestNames() - %@", error ?: @"None returned");
@ -128,14 +128,13 @@ extern NSMutableArray *RCTGetModuleClasses(void);
}
}
+ (id)invokeMethod:(NSString *)method inModule:(NSString *)module error:(NSError * __strong *)outError {
+ (id)invokeMethod:(NSString *)method arguments:(NSArray *)arguments error:(NSError * __strong *)outError {
id<RCTJavaScriptExecutor> executor = [self currentExecutor];
module = [NSString stringWithFormat:@"realm-tests/%@.js", module];
__block BOOL condition = NO;
__block id result;
[executor executeJSCall:module method:method arguments:@[] callback:^(id json, NSError *error) {
[executor executeJSCall:@"realm-tests/index.js" method:method arguments:(arguments ?: @[]) callback:^(id json, NSError *error) {
// The React Native debuggerWorker.js very bizarrely returns an array five empty arrays to signify an error.
if ([json isKindOfClass:[NSArray class]] && [json isEqualToArray:@[@[], @[], @[], @[], @[]]]) {
json = nil;
@ -169,7 +168,7 @@ extern NSMutableArray *RCTGetModuleClasses(void);
}
NSError *error;
[self.class invokeMethod:method inModule:module error:&error];
[self.class invokeMethod:@"runTest" arguments:@[module, method] error:&error];
if (error) {
// TODO: Parse and use localizedFailureReason info once we can source map the failure location in JS.

View File

@ -1,5 +1,5 @@
{
"name": "Demo",
"name": "ReactTests",
"version": "0.0.1",
"private": true,
"scripts": {

16
vendor/.npmignore vendored Normal file
View File

@ -0,0 +1,16 @@
.travis.yml
GCDWebServer/*.podspec
GCDWebServer/*.xcodeproj
GCDWebServer/*.sh
GCDWebServer/Frameworks
GCDWebServer/GCDWebDAVServer
GCDWebServer/GCDWebUploader
GCDWebServer/iOS
GCDWebServer/Mac
GCDWebServer/Tests
GCDWebServer/tvOS
PEGTL/Makefile
PEGTL/examples
PEGTL/unit_tests